protected void setDirty(boolean dirty) { // We need to set the dirty state on the compare editor input // since it is our only connection to the merge viewer editorInput.setDirty(dirty); }
@Override protected void setDirty(boolean dirty) { if (editorInput instanceof SaveablesCompareEditorInput) { ((SaveablesCompareEditorInput) editorInput).setDirty(dirty, this); return; } // We need to set the dirty state on the compare editor input // since it is our only connection to the merge viewer editorInput.setDirty(dirty); }
/** * Creates a <code>CompareEditorInput</code> which is initialized with the given * compare configuration. * The compare configuration is passed to subsequently created viewers. * * @param configuration the compare configuration */ public CompareEditorInput(CompareConfiguration configuration) { fCompareConfiguration= configuration; Assert.isNotNull(configuration); fDirtyStateListener= e -> { String propertyName= e.getProperty(); if (CompareEditorInput.DIRTY_STATE.equals(propertyName)) { boolean changed= false; Object newValue= e.getNewValue(); if (newValue instanceof Boolean) changed= ((Boolean) newValue).booleanValue(); setDirty(e.getSource(), changed); } }; IPreferenceStore ps= configuration.getPreferenceStore(); if (ps != null) fStructureCompareOnSingleClick= ps.getBoolean(ComparePreferencePage.OPEN_STRUCTURE_COMPARE); fContainer = configuration.getContainer(); configuration.setContainer(this); }