/** * Get the properties for a given id. * @param id A unique id to identify the properties (e.g. component or service name). * @return A future containing the properties (if any). */ public IFuture<Properties> getProperties(String id) { return new Future<Properties>(props.getSubproperty(id)); }
/** * Get the properties for a given id. * @param id A unique id to identify the properties (e.g. component or service name). * @return A future containing the properties (if any). */ public IFuture<Properties> getProperties(String id) { return new Future<Properties>(props.getSubproperty(id)); }
/** * Set properties loaded from project. */ public IFuture setProperties(Properties props) { Properties ps = props.getSubproperty("convcenter"); if(ps!=null) convcenter.setProperties(ps); return IFuture.DONE; }
/** * Set properties loaded from project. */ public IFuture setProperties(Properties props) { Properties ps = props.getSubproperty("convcenter"); if(ps!=null) convcenter.setProperties(ps); return IFuture.DONE; }
/** * Get the properties for a given id. * @param id A unique id to identify the properties (e.g. component or service name). * @return A future containing the properties (if any). */ public IFuture<Properties> getProperties(String id) { return new Future<Properties>(props.getSubproperty(id)); }
/** * Set the properties. */ public IFuture<Void> setProperties(Properties props) { Properties firstprops = props.getSubproperty("first"); if(firstprops!=null) p1.setProperties(firstprops); Properties secondprops = props.getSubproperty("second"); if(secondprops!=null) p2.setProperties(secondprops); splitpanel.setDividerLocation(props.getIntProperty("split_location")); return IFuture.DONE; }
/** * Set the properties. */ public IFuture<Void> setProperties(Properties props) { Properties firstprops = props.getSubproperty("first"); if(firstprops!=null) p1.setProperties(firstprops); Properties secondprops = props.getSubproperty("second"); if(secondprops!=null) p2.setProperties(secondprops); splitpanel.setDividerLocation(props.getIntProperty("split_location")); return IFuture.DONE; }
/** * Set properties loaded from project. */ public IFuture<Void> setProperties(final Properties props) { final Future<Void> ret = new Future<Void>(); this.props = props; // System.out.println("set props: "+props); if(selcb.getSelectedItem()!=null && panels.containsKey(selcb.getSelectedItem())) { IAbstractViewerPanel panel = (IAbstractViewerPanel)panels.get(selcb.getSelectedItem()); panel.setProperties(props.getSubproperty(PANELPROPERTIES)) .addResultListener(new DelegationResultListener<Void>(ret)); } else { ret.setResult(null); } return ret; }
/** * Set properties loaded from project. */ public IFuture<Void> setProperties(final Properties props) { final Future<Void> ret = new Future<Void>(); this.props = props; // System.out.println("set props: "+props); if(selcb.getSelectedItem()!=null && panels.containsKey(selcb.getSelectedItem())) { IAbstractViewerPanel panel = (IAbstractViewerPanel)panels.get(selcb.getSelectedItem()); panel.setProperties(props.getSubproperty(PANELPROPERTIES)) .addResultListener(new DelegationResultListener<Void>(ret)); } else { ret.setResult(null); } return ret; }
public void customResultAvailable(Properties mprops) { props = mprops; final CounterResultListener<Void> crl = new CounterResultListener<Void>(providers.size(), access.createResultListener(new DelegationResultListener<Void>(ret))); for(Iterator<String> it=providers.keySet().iterator(); it.hasNext(); ) { final String id = it.next(); IPropertiesProvider provider = providers.get(id); Properties sub = props.getSubproperty(id); if(sub!=null) { provider.setProperties(sub).addResultListener(access.createResultListener(crl)); } else { crl.resultAvailable(null); } } } });
public void customResultAvailable(Void result) { Properties sub = props!=null ? props.getSubproperty(panel.getId()) : null; if(sub!=null) panel.setProperties(sub); JComponent comp = panel.getComponent(); // todo: help //SHelp.setupHelp(comp, getHelpID()); panels.put(exta.getComponentIdentifier(), panel); detail.add(comp, exta.getComponentIdentifier()); comptree.getModel().fireNodeChanged(node); } });
public void customResultAvailable(Properties mprops) { props = mprops; final CounterResultListener<Void> crl = new CounterResultListener<Void>(providers.size(), access.getComponentFeature(IExecutionFeature.class).createResultListener(new DelegationResultListener<Void>(ret))); for(Iterator<String> it=providers.keySet().iterator(); it.hasNext(); ) { final String id = it.next(); IPropertiesProvider provider = providers.get(id); Properties sub = props.getSubproperty(id); if(sub!=null) { provider.setProperties(sub).addResultListener(access.getComponentFeature(IExecutionFeature.class).createResultListener(crl)); } else { crl.resultAvailable(null); } } } });
/** * Set properties loaded from project. */ public IFuture<Void> setProperties(Properties ps) { Future<Void> ret = new Future<Void>(); this.props = ps; IAbstractViewerPanel[] pans = (IAbstractViewerPanel[])panels.values().toArray(new IAbstractViewerPanel[0]); CounterResultListener<Void> lis = new CounterResultListener<Void>(pans.length, true, new SwingDelegationResultListener<Void>(ret)); for(int i=0; i<pans.length; i++) { Properties sub = props!=null? props.getSubproperty(pans[i].getId()): null; pans[i].setProperties(sub).addResultListener(lis); } return ret; }
public void customResultAvailable(Void result) { JComponent comp = plugin.getView(); // plugins.put(plugin, comp); addPluginComponent(plugin, comp); if(props.getSubproperty(plugin.getName())!=null) { plugin.setProperties(props.getSubproperty(plugin.getName())) .addResultListener(new SwingDelegationResultListener<Void>(ret)); } else { ret.setResult(null); } } });
public void customResultAvailable(Void result) { JComponent comp = plugin.getView(); // plugins.put(plugin, comp); addPluginComponent(plugin, comp); if(props.getSubproperty(plugin.getName())!=null) { plugin.setProperties(props.getSubproperty(plugin.getName())) .addResultListener(new SwingDelegationResultListener<Void>(ret)); } else { ret.setResult(null); } } });
private static void loadPreferencesIntoProperties(Properties props, IPreferences preferences, boolean preferFileProperties) { Map<String, ?> prefs = preferences.getAll(); for (Entry<String, ?> pref : prefs.entrySet()) { String[] key = pref.getKey().split("\\."); String targetPropValue = (String) pref.getValue(); Properties parentProps = props; for (int i = 0; i < key.length - 1; i++) { String id = key[i]; Properties childProps = parentProps.getSubproperty(id); if (childProps == null) { childProps = new Properties(null, id, null); parentProps.addSubproperties(childProps); } parentProps = childProps; } String targetPropId = key[key.length - 1]; Property targetProp = parentProps.getProperty(targetPropId); if (targetProp == null) { targetProp = new Property(targetPropId, targetPropValue); parentProps.addProperty(targetProp); } else if (!preferFileProperties){ parentProps.getProperty(targetPropId).setValue(targetPropValue); } } }
Properties sub = props.getSubproperty(id); if(sub!=null)
Properties sub = props.getSubproperty(id); if(sub!=null)
public void valueChanged(TreeSelectionEvent e) { JTree tree = comptree.getTree(); if(tree.getSelectionPath()!=null) { ISwingTreeNode node = (ISwingTreeNode)tree.getSelectionPath().getLastPathComponent(); Object nodeid = node.getId(); if(nodeid!=null) { if(cards.getComponent(nodeid)!=null) { storeCurrentPanelSettings(); IAbstractViewerPanel panel = panels.get(nodeid); panel.setProperties(props!=null ? props.getSubproperty(panel.getId()) : null); cards.show(nodeid); } } } } });
public void customResultAvailable(Object result) { // Select the last selected model in the tree. if(mep.getSelectedNode()!=null) expansionhandler.setSelectedPath(mep.getSelectedNode()); // Load the expanded tree nodes. if(mep.getExpandedNodes()!=null) expansionhandler.setExpandedPaths(mep.getExpandedNodes()); root.refresh(true); // Load the filter settings Properties filterprops = props.getSubproperty("mic"); if(mic instanceof IPropertiesProvider) { ((IPropertiesProvider)mic).setProperties(filterprops) .addResultListener(new SwingDelegationResultListener(ret) { public void customResultAvailable(Object result) { ret.setResult(null); }; }); } else { ret.setResult(null); } } });