diff options
author | Uwe Stieber | 2012-11-24 08:45:24 +0000 |
---|---|---|
committer | Uwe Stieber | 2012-11-24 08:45:24 +0000 |
commit | e8811878dac2fc07a32cdc03c896fd9cee41c90b (patch) | |
tree | 2387390bad56acb40ce6b48b0ecd5570937ba8df /target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src | |
parent | 00ab8a8ae033e5b30037cf098dab4f2407295647 (diff) | |
download | org.eclipse.tcf-e8811878dac2fc07a32cdc03c896fd9cee41c90b.tar.gz org.eclipse.tcf-e8811878dac2fc07a32cdc03c896fd9cee41c90b.tar.xz org.eclipse.tcf-e8811878dac2fc07a32cdc03c896fd9cee41c90b.zip |
Target Explorer: Revert changes to commit(onSave) in AbstractSection. Commit is expected to reset the dirty state.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java index 0a1205c3e..a3bc6938b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java @@ -216,9 +216,7 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable, * @param dirty <code>True</code> to mark the section dirty, <code>false</code> otherwise. */ public final void markDirty(boolean dirty) { - if (dirty) { - markDirty(); - } + if (dirty) markDirty(); else { // For now, there is no direct way to reset the dirty state, // and the refresh() method is setting back both flags (stale and dirty). @@ -234,9 +232,7 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable, } }); f.setBoolean(this, dirty); - if (getManagedForm() != null) { - getManagedForm().dirtyStateChanged(); - } + if (getManagedForm() != null) getManagedForm().dirtyStateChanged(); } catch (Exception e) { /* ignored on purpose */ } } } @@ -249,9 +245,7 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable, // commit is reseting the dirty state boolean hasBeenDirty = isDirty(); super.commit(onSave); - if (hasBeenDirty) { - markDirty(); - } + if (hasBeenDirty) getManagedForm().dirtyStateChanged(); } /* (non-Javadoc) @@ -263,12 +257,8 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable, boolean hasBeenStale = isStale(); boolean hasBeenDirty = isDirty(); super.refresh(); - if (hasBeenStale) { - getManagedForm().staleStateChanged(); - } - if (hasBeenDirty) { - getManagedForm().dirtyStateChanged(); - } + if (hasBeenStale) getManagedForm().staleStateChanged(); + if (hasBeenDirty) getManagedForm().dirtyStateChanged(); } /* (non-Javadoc) |