Refine search
public static void register(AbstractSavable as) { IC.add(as); }
public static void unregister(AbstractSavable as) { IC.remove(as); } }
/** Changes all pairs in the lookup to new values. Converts collection of * instances to collection of pairs. * @param col the collection of (Item) objects * @param conv the convertor to use or null */ public final <T,R> void set(Collection<T> col, Convertor<T,R> conv) { ArrayList<Pair<?>> l = new ArrayList<Pair<?>>(col.size()); Iterator<T> it = col.iterator(); if (conv == null) { while (it.hasNext()) { l.add(new SimpleItem<T>(it.next())); } } else { while (it.hasNext()) { l.add(new ConvertingItem<T,R>(it.next(), conv)); } } setPairs(l); }
CodeClipNodeFactory(XMLDataObject obj) { xmlDataObject = obj; InstanceContent content = new InstanceContent(); content.add(Node.class, this); lookup = new AbstractLookup(content); }
ProjectWebModule (WebProject project, UpdateHelper helper, ClassPathProviderImpl cpProvider) { this.project = project; this.helper = helper; this.cpProvider = cpProvider; myContent = new InstanceContent(); myLookup = new AbstractLookup( myContent ); //project.evaluator().addPropertyChangeListener(this); }
private PaletteItemDataNode(PaletteItemDataObject obj, InstanceContent ic) { super(obj, Children.LEAF, new AbstractLookup(ic)); ic.add(obj); ic.add(this); this.obj = obj; lookup = Lookups.singleton(this); }
/** * * @param suiteName name of the test suite, or {@code ANONYMOUS_SUITE} * in the case of anonymous suite * @see ResultDisplayHandler#ANONYMOUS_SUITE */ public TestNGSuiteNode(final String suiteName, final boolean filtered) { this(suiteName, filtered, new InstanceContent()); }
private void createRoot(MakeConfigurationDescriptor configurationDescriptor) { InstanceContent ic = new InstanceContent(); Folder logicalFolders = configurationDescriptor.getLogicalFolders(); ic.add(logicalFolders); addLookup(ic); projectRootNode = new MakeLogicalViewRootNode(logicalFolders, this, ic); }
public void propertyChange(PropertyChangeEvent evt) { if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) { selectedNodes.setPairs(Collections.<AbstractLookup.Pair>emptyList()); for (Node n : (Node[]) evt.getNewValue()) { selectedNodes.add(n); if (n instanceof AbstractCsmNode) { CsmObject csmObject = ((AbstractCsmNode) n).getCsmObject(); if (csmObject != null) { selectedNodes.add(csmObject); } } } } }
/** * Pass an initial set of capabilities. Called when the card's lookup is * being constructed. * @param capabilities An array of capabilities */ protected final void initCapabilities (ICardCapability... capabilities) { content.set(Arrays.asList(capabilities), null); }
public AnimationDataObject(AnimationEditor controller, FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); myController = controller; myInstance = new InstanceContent(); myLookup = new AbstractLookup(myInstance); myInstance.add(myController); setSaveCookie(); }
/** * Creates a new instance of ActivatedNodesMediator. * * @param delegate the Node delegate that must be excluded from Lookup * (may be null). */ public ActivatedNodesMediator(Node delegate) { nodesHack = new InstanceContent(); lookup = new AbstractLookup(nodesHack); this.delegate = delegate; }
private RootNode(List<BundleNode> resourceBundleNodes, InstanceContent content) { super (new RootChildren(resourceBundleNodes), new AbstractLookup(content)); content.add(this); this.rootChildren = (RootChildren) getChildren(); }
protected void selectionChanged(SVGObject [] newSelection, SVGObject [] oldSelection) { if (oldSelection != null) { for (int i = 0; i < oldSelection.length; i++) { m_lookupContent.remove(oldSelection[i]); } } if (newSelection != null && newSelection.length > 0) { for (int i = 0; i < newSelection.length; i++) { m_lookupContent.add(newSelection[i]); } } notifySelectionChanged(newSelection, oldSelection); }
public static synchronized ServerInstanceProviderLookup getInstance() { if (instance == null) { instance = new ServerInstanceProviderLookup(new InstanceContent()); } return instance; }
private void updateLookup() { Set<Object> stuff = new HashSet<Object>(); JavacardPlatform pform = platforms.getSelectedItem() instanceof JavacardPlatform ? (JavacardPlatform) platforms.getSelectedItem() : null; if (pform != null) { stuff.add(pform); } if (devices.getSelectedItem() instanceof Card) { stuff.add (devices.getSelectedItem()); } content.set(stuff, null); }
@Override public final synchronized Lookup getLookup() { if (myLookup == null) { ic = new InstanceContent(); ic.add(this); ic.add(getPrimaryFile()); if (needBinarySupport()) { ic.add(this, CndBinaryExecSupportProvider.staticFactory); } myLookup = new AbstractLookup(ic); } return myLookup; }
public FieldDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); registerEditor(Field.MIMETYPE, true); this.ic = new InstanceContent(); this.intern = new AbstractLookup(this.ic); fieldManager = Lookup.getDefault().lookup(FieldManager.class); assert fieldManager != null : "No FieldManager class found in the default lookup, unable to load the DataObject"; }
public KeyNode(Node orig, String bundlepath, String codenamebase, InstanceContent content) { super(orig, null, new AbstractLookup(content)); content.add(this); disableDelegation(DELEGATE_GET_DISPLAY_NAME | DELEGATE_SET_DISPLAY_NAME | DELEGATE_GET_SHORT_DESCRIPTION | DELEGATE_SET_SHORT_DESCRIPTION | DELEGATE_GET_ACTIONS); this.key = orig.getDisplayName(); this.bundlepath = bundlepath; this.codenamebase = codenamebase; cachedDisplayName = null; cachedHtmlDisplayName = null; }