diff --git a/platform/core-api/src/com/intellij/model/SymbolReference.java b/platform/core-api/src/com/intellij/model/SymbolReference.java new file mode 100644 index 000000000000..bef9da7a252b --- /dev/null +++ b/platform/core-api/src/com/intellij/model/SymbolReference.java @@ -0,0 +1,27 @@ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +package com.intellij.model; + +import org.jetbrains.annotations.NotNull; + +import java.util.Collection; + +import static org.jetbrains.annotations.ApiStatus.Experimental; + +/** + * A reference to a {@link Symbol} or possibly several Symbols. + *

+ * SymbolReference may be backed by a {@link com.intellij.psi.PsiElement PsiElement} but is not required to. + *

+ * Examples: + *

+ */ +@Experimental +public interface SymbolReference { + + @NotNull + Collection resolveReference(); +} diff --git a/platform/core-api/src/com/intellij/model/SymbolResolveResult.java b/platform/core-api/src/com/intellij/model/SymbolResolveResult.java new file mode 100644 index 000000000000..a04802d92c51 --- /dev/null +++ b/platform/core-api/src/com/intellij/model/SymbolResolveResult.java @@ -0,0 +1,18 @@ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +package com.intellij.model; + +import org.jetbrains.annotations.ApiStatus.Experimental; +import org.jetbrains.annotations.NotNull; + +/** + * A result of resolving a {@link SymbolReference}. + */ +@Experimental +public interface SymbolResolveResult { + + /** + * @return referenced Symbol + */ + @NotNull + Symbol getTarget(); +}