Java Code Examples for com.intellij.ide.projectView.PresentationData#clear()
The following examples show how to use
com.intellij.ide.projectView.PresentationData#clear() .
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: GlobalConfigsTreeStructure.java From mule-intellij-plugins with Apache License 2.0 | 5 votes |
private void updatePresentation() { PresentationData presentation = getPresentation(); presentation.clear(); presentation.addText(myName, SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES); if (myModule != null) presentation.addText(" (" + myModule.getName() + ")", SimpleTextAttributes.GRAYED_ITALIC_ATTRIBUTES); update(presentation); }
Example 2
Source File: GlobalConfigsTreeStructure.java From mule-intellij-plugins with Apache License 2.0 | 5 votes |
private void updatePresentation() { String connectorType = myTag.getName(); PresentationData presentation = getPresentation(); presentation.clear(); presentation.addText(myName, SimpleTextAttributes.REGULAR_ATTRIBUTES); presentation.addText(" (" + connectorType + ")", SimpleTextAttributes.GRAYED_ITALIC_ATTRIBUTES); update(presentation); }
Example 3
Source File: AbstractTreeBuilderTest.java From consulo with Apache License 2.0 | 5 votes |
@Override @Nonnull public NodeDescriptor doCreateDescriptor(final Object element, final NodeDescriptor parentDescriptor) { return new PresentableNodeDescriptor(null, parentDescriptor) { @Override protected void update(PresentationData presentation) { onElementAction("update", (NodeElement)element); presentation.clear(); presentation.addText(new ColoredFragment(getElement().toString(), SimpleTextAttributes.REGULAR_ATTRIBUTES)); if (myChanges.contains(element)) { myChanges.remove(element); presentation.setChanged(true); } } @javax.annotation.Nullable @Override public PresentableNodeDescriptor getChildToHighlightAt(int index) { return null; } @Override public Object getElement() { return element; } @Override public String toString() { List<ColoredFragment> coloredText = getPresentation().getColoredText(); StringBuilder result = new StringBuilder(); for (ColoredFragment each : coloredText) { result.append(each.getText()); } return result.toString(); } }; }
Example 4
Source File: PresentableNodeDescriptor.java From consulo with Apache License 2.0 | 5 votes |
private PresentationData getUpdatedPresentation() { PresentationData presentation = myUpdatedPresentation != null ? myUpdatedPresentation : createPresentation(); myUpdatedPresentation = presentation; presentation.clear(); update(presentation); if (shouldPostprocess()) { postprocess(presentation); } return presentation; }