public static void register(AbstractSavable as) { IC.add(as); }
/** * Provides an alternative to the ServiceProvider registration method. * * @since 1.0.3 * @param listener */ public static void addListener(GuiEventListener listener) { lookupContent.add(listener); }
@Override public void addLookup(DataObject dao, InstanceContent ic) { SourceDataObject sdao = (SourceDataObject) dao; ic.add(sdao, staticFactory); }
/** Helper method. Adds save cookie to the data object. */ private void addSaveCookie() { // Adds save cookie to the data object. ic.add(saveCookie); }
@Override public Object put(Object key, Object value) { content.add(value); return super.put(key, value); } }
private static <T extends Cookie> void addCookie(Class<T> c, CookieSet cs, InstanceContent i){ T t = cs.getCookie(c); if(t != null){ i.add(t); } }
public ShapeDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); registerEditor(MIMETYPE, true); ic.add(new FieldImportSource() { @Override public Set<FileObject> getFiles() { return files(); } }); }
private void doCheckJ2se(String packaging) { content.remove(runJarChecker); if (ProjectURLWatcher.TYPE_JAR.equals(packaging)) { content.add(runJarChecker); } } }
public void addCookie( Object cookie ){ if ( cookie == null ){ return; } Object old = getLookup().lookup(cookie.getClass()); myContent.add( cookie ); getPropertyChangeSupport().firePropertyChange(LOOKUP_ITEM, old, cookie); }
@Override public void propertyChange(PropertyChangeEvent arg0) { SaveCookie saveCookie = this.getLookup(). lookup(SaveCookie.class); if (null == saveCookie) { this.ic.add(new PartFieldSaveCapability()); } }
private void setSaveCookie(){ if(getLookup().lookup(SaveCookie.class) == null){ SaveCookie cookie = new AnimationSaveCookie(myController); myInstance.add(cookie); } if(getLookup().lookup(SaveAsCookie.class) == null){ SaveAsCookie saCookie = new AnimationSaveAsCookie(myController); myInstance.add(saCookie); } }
@Override protected Node createNodeDelegate() { Stock stock = stockManager.load(getPrimaryFile()); assert stock != null; LOGGER.log(Level.FINE, "StockDataObject loaded {0}", System.identityHashCode(stock)); ic.add(stock); LOGGER.log(Level.FINE, "Creating new node delegate for StockDataObject"); return super.createNodeDelegate(); }
/** * Create a new Editor support for the given C/C++/Fortran source. * @param entry The (primary) file entry representing the C/C++/f95 source file */ public CppEditorSupport(SourceDataObject obj, Node nodeDelegate) { super(obj, null, new Environment(obj)); this.ic = obj.getInstanceContent(); if (nodeDelegate != null) { this.ic.add(nodeDelegate); } } /**
CodeClipNodeFactory(XMLDataObject obj) { xmlDataObject = obj; InstanceContent content = new InstanceContent(); content.add(Node.class, this); lookup = new AbstractLookup(content); }
private RootNode(List<BundleNode> resourceBundleNodes, InstanceContent content) { super (new RootChildren(resourceBundleNodes), new AbstractLookup(content)); content.add(this); this.rootChildren = (RootChildren) getChildren(); }
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; }
public ShapeDataObject(FileObject fo, MultiFileLoader loader) throws DataObjectExistsException { super(fo, loader); checkDefaultAttributes(); checkValidity(); ic.add(new ShapeMappableSource(this)); }
@Override protected void setStatus(Status status) { super.setStatus(status); if (Status.COMPLETE.equals(status) && getLookup().lookup(ExportableTaskCapability.class) == null) { ic.add(exportableTaskCapability); } else if (Status.INCOMPLETE.equals(status) && getLookup().lookup(ExportableTaskCapability.class) != null) { ic.remove(exportableTaskCapability); } }
public BundleNode(Node orig, String bundlepath, String codenamebase, InstanceContent content) { super(orig, new BundleChildren (orig, bundlepath, codenamebase), 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); setDisplayName(bundlepath); setShortDescription(codenamebase); this.bundlepath = bundlepath; this.codenamebase = codenamebase; this.bundleChildren = (BundleChildren) getChildren(); }