本文整理汇总了Java中com.intellij.ide.projectView.PresentationData.clear方法的典型用法代码示例。如果您正苦于以下问题:Java PresentationData.clear方法的具体用法?Java PresentationData.clear怎么用?Java PresentationData.clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.projectView.PresentationData
的用法示例。
在下文中一共展示了PresentationData.clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePresentation
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
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);
}
示例2: getUpdatedPresentation
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
private PresentationData getUpdatedPresentation() {
PresentationData presentation = myUpdatedPresentation != null ? myUpdatedPresentation : createPresentation();
myUpdatedPresentation = presentation;
presentation.clear();
update(presentation);
if (shouldPostprocess()) {
postprocess(presentation);
}
return presentation;
}
示例3: doCreateDescriptor
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
@NotNull
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);
}
}
@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();
}
};
}