当前位置: 首页>>代码示例>>Java>>正文


Java CellProviderWithRole.setAllowsEmptyTarget方法代码示例

本文整理汇总了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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:22,代码来源:DirectCall_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:WorkSpace_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:22,代码来源:WorkSpace_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:20,代码来源:Timeout_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:21,代码来源:Activity_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:20,代码来源:Activity_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:17,代码来源:general1arg_EditorBuilder_a.java

示例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;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:17,代码来源:Argument_EditorBuilder_a.java


注:本文中的jetbrains.mps.nodeEditor.cellProviders.CellProviderWithRole.setAllowsEmptyTarget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。