/** * Returns <code>true</code> if there are unsaved changes. * The method should be called by any parts or dialogs * that contain the input. * By default, this method calls {@link #isSaveNeeded()} * but subclasses may extend. * @return <code>true</code> if there are unsaved changes * @since 3.3 */ public boolean isDirty() { return isSaveNeeded(); }
/** * Returns <code>true</code> if there are unsaved changes. * The method should be called by any parts or dialogs * that contain the input. * By default, this method calls {@link #isSaveNeeded()} * but subclasses may extend. * @return <code>true</code> if there are unsaved changes * @since 3.3 */ public boolean isDirty() { return isSaveNeeded(); }
public boolean isDirty() { // We need to get the dirty state from the compare editor input // since it is our only connection to the merge viewer return editorInput.isSaveNeeded(); }
/** * Sets the dirty state of this input to the given value and sends out a * <code>PropertyChangeEvent</code> if the new value differs from the old * value. Direct calling this method with parameter dirty equal to * <code>false</code> when there are unsaved changes in viewers, results in * inconsistent state. The dirty state of compare input should be based only * on the information if there are changes in viewers for left or right * side. * * @param dirty * the dirty state for this compare input */ public void setDirty(boolean dirty) { boolean oldDirty = isSaveNeeded(); fLeftDirty = dirty; fRightDirty = dirty; if (oldDirty != isSaveNeeded()) { Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); } }
/** * Sets the dirty state of left site of this input to the given value and * sends out a <code>PropertyChangeEvent</code> if the new value for whole * input differs from the old value. Direct calling this method with * parameter dirty equal to <code>false</code> when there are unsaved * changes in left viewer, results in inconsistent state. The dirty state of * compare input should be based only on the information if there are * changes in viewers for left side. * * @param dirty * the dirty state for this compare input * @since 3.7 * @noreference This method is not intended to be referenced by clients. * @nooverride This method is not intended to be re-implemented or extended * by clients. */ protected void setLeftDirty(boolean dirty) { boolean oldDirty = isSaveNeeded(); fLeftDirty = dirty; if (oldDirty != isSaveNeeded()) { Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); } }
@Override public boolean isDirty() { // We need to get the dirty state from the compare editor input // since it is our only connection to the merge viewer if (editorInput instanceof SaveablesCompareEditorInput) { return ((SaveablesCompareEditorInput) editorInput).isSaveNeeded(this); } return editorInput.isSaveNeeded(); }
/** * Sets the dirty state of right site of this input to the given value and * sends out a <code>PropertyChangeEvent</code> if the new value for whole * input differs from the old value. Direct calling this method with * parameter dirty equal to <code>false</code> when there are unsaved * changes in right viewer, results in inconsistent state. The dirty state * of compare input should be based only on the information if there are * changes in viewers for right side. * * @param dirty * the dirty state for this compare input * @since 3.7 * @noreference This method is not intended to be referenced by clients. * @nooverride This method is not intended to be re-implemented or extended * by clients. */ protected void setRightDirty(boolean dirty) { boolean oldDirty = isSaveNeeded(); fRightDirty = dirty; if (oldDirty != isSaveNeeded()) { Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); } }
boolean oldDirty = isSaveNeeded(); boolean newDirty = isSaveNeeded(); if (DEBUG) { System.out.println("setDirty(" + source + ", " + dirty + "): " + newDirty); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$