Java Code Examples for com.intellij.openapi.util.Iconable#ICON_FLAG_VISIBILITY
The following examples show how to use
com.intellij.openapi.util.Iconable#ICON_FLAG_VISIBILITY .
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: IconDescriptorUpdaters.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull private static Image computeBaseIcon(@Nonnull PsiElement element, int flags) { Image icon = computeBaseIcon(element); if ((flags & Iconable.ICON_FLAG_VISIBILITY) > 0) { return ImageEffects.appendRight(icon, ourVisibilityIconPlaceholder.getValue()); } return icon; }
Example 2
Source File: PsiTreeElementBase.java From consulo with Apache License 2.0 | 5 votes |
@Override public Image getIcon() { final PsiElement element = getElement(); if (element != null) { int flags = Iconable.ICON_FLAG_READ_STATUS; if (!(element instanceof PsiFile) || !element.isWritable()) flags |= Iconable.ICON_FLAG_VISIBILITY; return IconDescriptorUpdaters.getIcon(element, flags); } else { return null; } }
Example 3
Source File: SmartElementDescriptor.java From consulo with Apache License 2.0 | 5 votes |
@RequiredUIAccess @Override public boolean update() { PsiElement element = mySmartPointer.getElement(); if (element == null) return true; int flags = Iconable.ICON_FLAG_VISIBILITY; if (isMarkReadOnly()){ flags |= Iconable.ICON_FLAG_READ_STATUS; } consulo.ui.image.Image icon = null; try { icon = IconDescriptorUpdaters.getIcon(element, flags); } catch (IndexNotReadyException ignored) { } Color color = null; if (isMarkModified() ){ VirtualFile virtualFile = PsiUtilCore.getVirtualFile(element); if (virtualFile != null) { color = FileStatusManager.getInstance(myProject).getStatus(virtualFile).getColor(); } } if (CopyPasteManager.getInstance().isCutElement(element)) { color = CopyPasteManager.CUT_COLOR; } boolean changes = !Comparing.equal(icon, getIcon()) || !Comparing.equal(color, myColor); setIcon(icon); myColor = color; return changes; }
Example 4
Source File: MethodNodeBase.java From consulo with Apache License 2.0 | 5 votes |
public void customizeRenderer(ColoredTreeCellRenderer renderer) { if (myMethod == null) return; int flags = Iconable.ICON_FLAG_VISIBILITY | Iconable.ICON_FLAG_READ_STATUS; renderer.setIcon(IconDescriptorUpdaters.getIcon(myMethod, flags)); customizeRendererText(renderer); }
Example 5
Source File: GutterPsiElementListCellRenderer.java From camel-idea-plugin with Apache License 2.0 | 4 votes |
@Override protected int getIconFlags() { return Iconable.ICON_FLAG_VISIBILITY; }
Example 6
Source File: PartialTypeCollector.java From consulo-csharp with Apache License 2.0 | 4 votes |
@Override protected int getIconFlags() { return Iconable.ICON_FLAG_VISIBILITY; }
Example 7
Source File: DefaultPsiElementCellRenderer.java From consulo with Apache License 2.0 | 4 votes |
@Override protected int getIconFlags() { return Iconable.ICON_FLAG_VISIBILITY; }