public static void unregister(AbstractSavable as) { IC.remove(as); } }
/** Helper method. Removes save cookie from the data object. */ private void removeSaveCookie() { // Remove save cookie from the data object. ic.remove(saveCookie); }
/** * Remove a capability from this card * @param c The capability */ protected final void removeCapability(ICardCapability c) { content.remove(c); }
/** * Provides an alternative to the ServiceProvider registration method. * * @since 1.0.3 * @param listener */ public static void removeListener(GuiEventListener listener) { lookupContent.remove(listener); } }
private static <T extends Cookie> void removeCookie(Class<T> c, Lookup l, InstanceContent i){ T t = l.lookup(c); if(t != null){ i.remove(t); } }
/******************************************************************************************************************* * * Programmatically removes a role from this set. * * @param role the role to remove * ******************************************************************************************************************/ public void removeRole (@Nonnull final Object role) { dynamicRoles.remove(role); }
/** * Unconditionally clears the project lookup. */ private void clearProjectLookup() { if (projectLookup != null) { Collection<? extends Project> projects = projectLookup.lookupAll(Project.class); for (Project project : projects) { content.remove(project); } } }
@Override public synchronized Object remove(Object key) { Object oldValue = constantInstances.remove(key); if (oldValue != null) { constantContent.remove(oldValue); } LOG.info("removed: key = " + key + ", oldValue = " + oldValue); return oldValue; }
private void doCheckJ2se(String packaging) { content.remove(runJarChecker); if (ProjectURLWatcher.TYPE_JAR.equals(packaging)) { content.add(runJarChecker); } } }
/** * Remove a capability by type * @param <T> * @param type */ @SuppressWarnings("unchecked") //NOI18N protected <T extends Class<? extends ICardCapability>> void removeCapability(T type) { Object t = getLookup().lookup((Class<? extends ICardCapability>)type); if (t != null) { content.remove(t); } }
public void removeCookie( Object cookie ){ if ( cookie == null ){ return; } myContent.remove( cookie); getPropertyChangeSupport().firePropertyChange(LOOKUP_ITEM, cookie, null); }
private void remove() { unregister(); ic.remove(this); }
void destroy() { tc.instanceContent.remove(this); unregister(); }
void destroy() { tc.instanceContent.remove(this); unregister(); }
@Override public void destroy() { getDataObject().ic.remove(FieldTaskSavable.this); unregister(); }
@Override protected void handleSave() { LoadedSnapshot toSave = snapshot; if (toSave == null) return; // #218565 snapshot already closed ResultsManager.getDefault().saveSnapshot(toSave); ic.remove(this); }
@Override public void save() throws IOException { FileObject fo = FieldDataObject.this.getPrimaryFile(); Field field = FieldDataObject.this.getLookup().lookup(Field.class); FieldDataObject.this.fieldManager.save(field, fo); FieldDataObject.this.ic.remove(FieldSaveCapability.this); } }
@Override public void save() throws IOException { FileObject fo = FarmDataObject.this.getPrimaryFile(); Farm farm = FarmDataObject.this.getLookup(). lookup(Farm.class); FarmDataObject.this.farmManager.save(farm, fo); FarmDataObject.this.ic.remove(FieldSaveCapability.this); } }
@Override public void save() throws IOException { FileObject fo = CropsStorageDataObject.this.getPrimaryFile(); CropsStorage crops = CropsStorageDataObject.this.getCropsStorage(); CropsStorageDataObject.this.cropManager.save(crops, fo); CropsStorageDataObject.this.ic.remove(CropSaveCapability.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); } }