@Override public void undefine() { string = null; final boolean definedChanged = defined; defined = false; final boolean nameChanged = name != null; name = null; final boolean descriptionChanged = description != null; description = null; fireCategoryChanged(new CategoryEvent(this, definedChanged, descriptionChanged, nameChanged)); }
@Override public void undefine() { string = null; final boolean definedChanged = defined; defined = false; final boolean nameChanged = name != null; name = null; final boolean descriptionChanged = description != null; description = null; fireCategoryChanged(new CategoryEvent(this, definedChanged, descriptionChanged, nameChanged)); }
@Override public void undefine() { string = null; final boolean definedChanged = defined; defined = false; final boolean nameChanged = name != null; name = null; final boolean descriptionChanged = description != null; description = null; fireCategoryChanged(new CategoryEvent(this, definedChanged, descriptionChanged, nameChanged)); }
/** * <p> * Defines this category by giving it a name, and possibly a description as * well. The defined property automatically becomes <code>true</code>. * </p> * <p> * Notification is sent to all listeners that something has changed. * </p> * * @param name * The name of this command; must not be <code>null</code>. * @param description * The description for this command; may be <code>null</code>. */ public final void define(final String name, final String description) { if (name == null) { throw new NullPointerException("The name of a command cannot be null"); //$NON-NLS-1$ } final boolean definedChanged = !this.defined; this.defined = true; final boolean nameChanged = !Util.equals(this.name, name); this.name = name; final boolean descriptionChanged = !Util.equals(this.description, description); this.description = description; fireCategoryChanged(new CategoryEvent(this, definedChanged, descriptionChanged, nameChanged)); }
/** * <p> * Defines this category by giving it a name, and possibly a description as * well. The defined property automatically becomes <code>true</code>. * </p> * <p> * Notification is sent to all listeners that something has changed. * </p> * * @param name * The name of this command; must not be <code>null</code>. * @param description * The description for this command; may be <code>null</code>. */ public final void define(final String name, final String description) { if (name == null) { throw new NullPointerException("The name of a command cannot be null"); //$NON-NLS-1$ } final boolean definedChanged = !this.defined; this.defined = true; final boolean nameChanged = !Util.equals(this.name, name); this.name = name; final boolean descriptionChanged = !Util.equals(this.description, description); this.description = description; fireCategoryChanged(new CategoryEvent(this, definedChanged, descriptionChanged, nameChanged)); }
/** * <p> * Defines this category by giving it a name, and possibly a description as * well. The defined property automatically becomes <code>true</code>. * </p> * <p> * Notification is sent to all listeners that something has changed. * </p> * * @param name * The name of this command; must not be <code>null</code>. * @param description * The description for this command; may be <code>null</code>. */ public final void define(final String name, final String description) { if (name == null) { throw new NullPointerException("The name of a command cannot be null"); //$NON-NLS-1$ } final boolean definedChanged = !this.defined; this.defined = true; final boolean nameChanged = !Util.equals(this.name, name); this.name = name; final boolean descriptionChanged = !Util.equals(this.description, description); this.description = description; fireCategoryChanged(new CategoryEvent(this, definedChanged, descriptionChanged, nameChanged)); }