本文整理汇总了Java中com.intellij.diagram.presentation.DiagramState类的典型用法代码示例。如果您正苦于以下问题:Java DiagramState类的具体用法?Java DiagramState怎么用?Java DiagramState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DiagramState类属于com.intellij.diagram.presentation包,在下文中一共展示了DiagramState类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getItemIcon
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@Override
public Icon getItemIcon(Object element, DiagramState presentation) {
// todo make them Iconable instead?
if (element instanceof SchemaEntityTagDecl)
return SchemaPresentationUtil.TAG_ICON;
if (element instanceof SchemaFieldDecl)
return SchemaPresentationUtil.FIELD_ICON;
if (element instanceof SchemaEnumMemberDecl)
return SchemaPresentationUtil.ENUM_MEMBER_ICON;
if (element instanceof SchemaAnnotation)
return SchemaPresentationUtil.ANNOTATION_ICON;
return super.getItemIcon(element, presentation);
}
示例2: isInCategory
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@Override
public boolean isInCategory(
final Object o,
final DiagramCategory diagramCategory,
final DiagramState diagramState
) {
return false;
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:9,代码来源:ModuleDepDiagramNodeContentManager.java
示例3: getItemName
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@Nullable
@Override
public SimpleColoredText getItemName(final Object element, final DiagramState diagramState) {
return element instanceof ModuleDepDiagramItem
? new SimpleColoredText(((ModuleDepDiagramItem) element).getName(), DEFAULT_TITLE_ATTR)
: null;
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:ModuleDepDiagramElementManager.java
示例4: getItemName
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@Nullable
@Override
public SimpleColoredText getItemName(Object o, DiagramState diagramState) {
if (o instanceof PsiNamedElement) {
PsiNamedElement namedElement = (PsiNamedElement) o;
final String itemName, itemType;
if (namedElement instanceof SchemaFieldDecl) {
SchemaFieldDecl fieldDecl = (SchemaFieldDecl) namedElement;
itemName = fieldDecl.getQid().getCanonicalName();
SchemaValueTypeRef valueTypeRef = fieldDecl.getValueTypeRef();
itemType = valueTypeRef == null ? null : valueTypeRef.getTypeRef().getText();
} else if (namedElement instanceof SchemaEntityTagDecl) {
SchemaEntityTagDecl tagDecl = (SchemaEntityTagDecl) namedElement;
itemName = tagDecl.getQid().getCanonicalName();
SchemaTypeRef typeRef = tagDecl.getTypeRef();
itemType = typeRef == null ? null : typeRef.getText();
} else {
itemName = namedElement.getName();
if (itemName == null) return null;
itemType = null;
}
SimpleColoredText res = new SimpleColoredText(itemName, DEFAULT_TITLE_ATTR);
if (itemType != null) res.append(" : " + itemType, DEFAULT_TEXT_ATTR);
return res;
}
return null;
}
示例5: isInCategory
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@SuppressWarnings("RedundantIfStatement")
@Override
public boolean isInCategory(Object o, DiagramCategory category, DiagramState diagramState) {
if (o instanceof SchemaEntityTagDecl && category == TAGS) return true;
if (o instanceof SchemaFieldDecl && category == FIELDS) return true;
if (o instanceof SchemaAnnotation && category == ANNOTATIONS) return true;
if (o instanceof SchemaEnumMemberDecl && category == ENUM_MEMBERS) return true;
return false;
}
示例6: getItemName
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@Nullable
@Override
public SimpleColoredText getItemName(Object o, DiagramState state) {
if (o instanceof PsiElement) {
return new SimpleColoredText(getElementTitle((PsiElement) o), DEFAULT_TEXT_ATTR);
} else {
return null;
}
}
示例7: getItemName
import com.intellij.diagram.presentation.DiagramState; //导入依赖的package包/类
@Nullable
@Override
public SimpleColoredText getItemName(final Object o, final DiagramState diagramState) {
return null;
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:6,代码来源:BpDiagramElementManagerIml.java