Java Code Examples for com.intellij.psi.presentation.java.SymbolPresentationUtil#getSymbolContainerText()
The following examples show how to use
com.intellij.psi.presentation.java.SymbolPresentationUtil#getSymbolContainerText() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GotoSymbolModel2.java From consulo with Apache License 2.0 | 6 votes |
@Override public String getFullName(final Object element) { for(ChooseByNameContributor c: getContributors()) { if (c instanceof GotoClassContributor) { String result = ((GotoClassContributor) c).getQualifiedName((NavigationItem) element); if (result != null) return result; } } if (element instanceof PsiElement) { final PsiElement psiElement = (PsiElement)element; final String containerText = SymbolPresentationUtil.getSymbolContainerText(psiElement); return containerText + "." + getElementName(element); } return getElementName(element); }
Example 2
Source File: PartialTypeCollector.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Nullable @Override protected String getContainerText(PsiElement element, String name) { VirtualFile virtualFile = PsiUtilCore.getVirtualFile(element); if(virtualFile == null) { return SymbolPresentationUtil.getSymbolContainerText(element); } else { return "(" + virtualFile.getPath() + ")"; } }
Example 3
Source File: PsiMappedElementListCellRender.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override public String getContainerText(PsiElement element, final String name) { PsiElement map = myMap.fun(element); if(map != null) { return SymbolPresentationUtil.getSymbolContainerText(map); } return SymbolPresentationUtil.getSymbolContainerText(element); }
Example 4
Source File: TwigLineMarkerProvider.java From idea-php-symfony2-plugin with MIT License | 5 votes |
@Nullable @Override protected String getContainerText(PsiElement psiElement, String s) { // relative path else fallback to default name extraction PsiFile containingFile = psiElement.getContainingFile(); String relativePath = VfsUtil.getRelativePath(containingFile.getVirtualFile(), ProjectUtil.getProjectDir(psiElement), '/'); return relativePath != null ? relativePath : SymbolPresentationUtil.getSymbolContainerText(psiElement); }
Example 5
Source File: DefaultPsiElementCellRenderer.java From consulo with Apache License 2.0 | 4 votes |
@Override public String getContainerText(PsiElement element, final String name){ return SymbolPresentationUtil.getSymbolContainerText(element); }