Пример #1
0
 private void createAttrConfigForNode(Node selected) {
   Config parent = null;
   if (selected instanceof Config) {
     parent = (Config) selected;
   } else if (selected instanceof AttrConfig) {
     parent = (Config) ((AttrConfig) selected).getParent();
   }
   if (parent != null) {
     String newName = unusedName("Attr", new AttrNameIter(parent));
     String type = ViperData.ViPER_DATA_URI + "svalue";
     AttrValueWrapper params = model.getMediator().getDataFactory().getAttribute(type);
     Node n = parent.createAttrConfig(newName, type, false, null, params);
     select(n);
   }
 }
Пример #2
0
 public AttrNameIter(Config c) {
   attrs = c.getChildren();
 }