public void customResultAvailable(Object result) { props.removeSubproperties(id); props.addSubproperties(id, (Properties)result); crl.resultAvailable(null); } };
public void customResultAvailable(Properties subprops) { // Properties subprops = (Properties)result; props.addSubproperties(PANELPROPERTIES, subprops!=null ? subprops : new Properties()); ret.setResult(props); }; });
public void customResultAvailable(Object result) { props.removeSubproperties(id); props.addSubproperties(id, (Properties)result); ret.setResult(null); } }));
public void customResultAvailable(Object result) { props.removeSubproperties(id); props.addSubproperties(id, (Properties)result); ret.setResult(null); } }));
public void customResultAvailable(Object result) { props.removeSubproperties(id); props.addSubproperties(id, (Properties)result); crl.resultAvailable(null); } };
public void customResultAvailable(Object result) { props.removeSubproperties(id); props.addSubproperties(id, (Properties)result); crl.resultAvailable(null); } };
public void customResultAvailable(Object result) { props.removeSubproperties(id); props.addSubproperties(id, (Properties)result); ret.setResult(null); } }));
public void customResultAvailable(Properties subprops) { // Properties subprops = (Properties)result; props.addSubproperties(PANELPROPERTIES, subprops!=null ? subprops : new Properties()); ret.setResult(props); }; });
public void customResultAvailable(Properties result) { if(result!=null) props.addSubproperties("first", result); p2props.addResultListener(new SwingDelegationResultListener<Properties>(ret) { public void customResultAvailable(Properties result) { if(result!=null) props.addSubproperties("second", result); ret.setResult(props); } }); } });
public void customResultAvailable(Properties result) { if(result!=null) props.addSubproperties("first", result); p2props.addResultListener(new SwingDelegationResultListener<Properties>(ret) { public void customResultAvailable(Properties result) { if(result!=null) props.addSubproperties("second", result); ret.setResult(props); } }); } });
/** * Add a subproperties to a properties. */ public void addSubproperties(String type, Properties subproperties) { if(subproperties.getType()!=null && !subproperties.getType().equals(type)) throw new IllegalArgumentException("Incompatible types: "+subproperties.getType()+", "+type); subproperties.setType(type); addSubproperties(subproperties); }
/** * Write current state into properties. */ public IFuture<Properties> getProperties() { Properties props = new Properties(); for(Tuple2<IResourceIdentifier, IResourceIdentifier> link: addedlinks) { Properties plink = new Properties(); Properties a = ridToProperties(link.getFirstEntity()); Properties b = ridToProperties(link.getSecondEntity()); plink.addSubproperties("a", a); plink.addSubproperties("b", b); props.addSubproperties("link", plink); } return new Future<Properties>(props); }
/** * Return properties to be saved in project. */ public IFuture getProperties() { Properties props = new Properties(); props.addSubproperties("convcenter", convcenter.getProperties()); return new Future(props); }
/** * Return properties to be saved in project. */ public IFuture getProperties() { Properties props = new Properties(); props.addSubproperties("convcenter", convcenter.getProperties()); return new Future(props); }
/** * Add the complete content of another properties. */ public void addProperties(Properties toadd) { Property[] subprops = toadd.getProperties(); for(int j=0; j<subprops.length; j++) { addProperty(subprops[j]); } Properties[] subpropis = toadd.getSubproperties(); for(int i=0; i<subpropis.length; i++) { // Properties tmp = getSubproperty(subpropis[i].getType()); // if(tmp!=null) // { // tmp.addProperties(subpropis[i]); // } // else { addSubproperties(subpropis[i]); } } }
/** * Write current state into properties. */ public IFuture<Properties> getProperties() { Properties props = new Properties(); for(Tuple2<IResourceIdentifier, IResourceIdentifier> link: addedlinks) { Properties plink = new Properties(); Properties a = ResourceIdentifier.ridToProperties(link.getFirstEntity(), component.getComponentIdentifier().getRoot()); Properties b = ResourceIdentifier.ridToProperties(link.getSecondEntity(), component.getComponentIdentifier().getRoot()); plink.addSubproperties("a", a); plink.addSubproperties("b", b); props.addSubproperties("link", plink); } return new Future<Properties>(props); }
public void customResultAvailable(Properties sub) { // Properties sub = (Properties)result; props.removeSubproperties(panel.getId()); if(sub!=null) { sub.setType(panel.getId()); props.addSubproperties(sub); } ret.setResult(props); }; });
/** * Set the properties for a given id. * Overwrites existing settings (if any). * @param id A unique id to identify the properties (e.g. component or service name). * @param properties The properties to set. * @param save Save platform properties after setting. * @return A future indicating when properties have been set. */ public IFuture<Void> setProperties(String id, Properties props) { // System.out.println("Set properties: "+id); final Future<Void> ret = new Future<Void>(); this.props.removeSubproperties(id); this.props.addSubproperties(id, props); if(providers.containsKey(id)) { ((IPropertiesProvider)providers.get(id)).setProperties(props) .addResultListener(access.createResultListener(new DelegationResultListener(ret))); } else { ret.setResult(null); } return ret; }
public void customResultAvailable(Collection<Tuple2<String, String>> result) { Properties props = new Properties(); Iterator<Tuple2<String, String>> it = result.iterator(); for(int i=0; i<tests.size(); i++) { Tuple2<String, String> local = it.next(); Properties entry = new Properties(); entry.addProperty(new Property("model", local.getFirstEntity())); entry.addProperty(new Property("ridurl", local.getSecondEntity())); // todo: save also repo info of gid IResourceIdentifier rid = tests.get(i).getSecondEntity(); String id = rid!=null && rid.getGlobalIdentifier()!=null? rid.getGlobalIdentifier().getResourceId(): null; entry.addProperty(new Property("globalrid", id)); props.addSubproperties("entry", entry); } props.addProperty(new Property("timeout", tfto.getText())); props.addProperty(new Property("concurrency", ""+concurrency)); props.addProperty(new Property("allowduplicates", ""+allowduplicates.isSelected())); ret.setResult(props); } });
public void customResultAvailable(Collection<Tuple2<String, String>> result) { Properties props = new Properties(); Iterator<Tuple2<String, String>> it = result.iterator(); for(int i=0; i<tests.size(); i++) { Tuple2<String, String> local = it.next(); Properties entry = new Properties(); entry.addProperty(new Property("model", local.getFirstEntity())); entry.addProperty(new Property("ridurl", local.getSecondEntity())); // todo: save also repo info of gid IResourceIdentifier rid = tests.get(i).getSecondEntity(); String id = rid!=null && rid.getGlobalIdentifier()!=null && rid.getGlobalIdentifier().getResourceId()!=null && !ResourceIdentifier.isHashGid(rid) ? rid.getGlobalIdentifier().getResourceId(): null; entry.addProperty(new Property("globalrid", id)); props.addSubproperties("entry", entry); } props.addProperty(new Property("timeout", tfto.getText())); props.addProperty(new Property("concurrency", ""+concurrency)); props.addProperty(new Property("allowduplicates", ""+allowduplicates.isSelected())); ret.setResult(props); } });