本文整理汇总了Java中jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole.setAllowsEmptyTarget方法的典型用法代码示例。如果您正苦于以下问题:Java CellProviderWithRole.setAllowsEmptyTarget方法的具体用法?Java CellProviderWithRole.setAllowsEmptyTarget怎么用?Java CellProviderWithRole.setAllowsEmptyTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole
的用法示例。
在下文中一共展示了CellProviderWithRole.setAllowsEmptyTarget方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createProperty_stlc2q_i0
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_stlc2q_i0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("number");
provider.setNoTargetText("number");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_number");
Style style = new StyleImpl();
new GreetingStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
style.set(StyleAttributes.EDITABLE, true);
style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例2: createProperty_ikqrmj_n0
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_ikqrmj_n0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("default_number");
provider.setNoTargetText("number");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_default_number");
Style style = new StyleImpl();
new GreetingStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray));
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例3: createProperty_ikqrmj_p0
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_ikqrmj_p0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("default_path");
provider.setNoTargetText("path");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_default_path");
Style style = new StyleImpl();
new GreetingStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例4: createProperty_tbvjtx_b0
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_tbvjtx_b0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("duration");
provider.setNoTargetText("time");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_duration");
Style style = new StyleImpl();
new GreetingStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例5: createProperty_luypn2_a0c0a
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_luypn2_a0c0a() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("name");
provider.setNoTargetText("name");
provider.setReadOnly(true);
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("button");
Style style = new StyleImpl();
new DeclarationsStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例6: createProperty_luypn2_a0e0a
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_luypn2_a0e0a() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("trigger");
provider.setNoTargetText("button");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("trigger");
Style style = new StyleImpl();
new DeclarationsStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
editorCell.getStyle().putAll(style);
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例7: createProperty_h6mjwv_b0
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_h6mjwv_b0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("value");
provider.setNoTargetText("");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_value");
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}
示例8: createProperty_jagqzb_b0
import jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole; //导入方法依赖的package包/类
private EditorCell createProperty_jagqzb_b0() {
CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
provider.setRole("value");
provider.setNoTargetText("");
provider.setAllowsEmptyTarget(true);
EditorCell editorCell;
editorCell = provider.createEditorCell(getEditorContext());
editorCell.setCellId("property_value");
editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
SNode attributeConcept = provider.getRoleAttribute();
if (attributeConcept != null) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
} else
return editorCell;
}