コード例 #1
0
 private EditorCell createProperty_ge17fi_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("variable");
   }
   Style style = new StyleImpl();
   PackagingStyles_StyleSheet.applyVariable(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #2
0
 private EditorCell createComponent_8rvrqs_b0(EditorContext editorContext, SNode node) {
   AbstractCellProvider provider = new AliasEditorComponent(node);
   EditorCell editorCell = provider.createEditorCell(editorContext);
   Style style = new StyleImpl();
   PackagingStyles_StyleSheet.applyKeyword(style, editorCell);
   editorCell.getStyle().putAll(style);
   return editorCell;
 }