diff options
author | Uwe Stieber | 2012-05-24 18:37:58 +0000 |
---|---|---|
committer | Uwe Stieber | 2012-05-24 18:37:58 +0000 |
commit | f56a98e36bca624467c66f12203b4583499b5c93 (patch) | |
tree | a365e12fc3e18703d556c6e89ea76e74ce326eac /target_explorer/plugins/org.eclipse.tcf.te.ui.forms | |
parent | 5d38a8643193750a65422d9c382d0924d1213133 (diff) | |
download | org.eclipse.tcf-f56a98e36bca624467c66f12203b4583499b5c93.tar.gz org.eclipse.tcf-f56a98e36bca624467c66f12203b4583499b5c93.tar.xz org.eclipse.tcf-f56a98e36bca624467c66f12203b4583499b5c93.zip |
Target Explorer: Introduce a flag to AbstractSection to allow control listeners to evaluate while the controls are updated
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui.forms')
2 files changed, 26 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java index 10ffb866a..c665a92c8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java @@ -77,6 +77,9 @@ public abstract class AbstractFormTextSection extends AbstractSection implements configureFormText(text);
section.setClient(client);
+
+ // Mark the control update as completed now
+ setIsUpdating(false);
}
/**
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 1b7c4fdaf..4a5f9b9ed 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 @@ -46,6 +46,13 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable, // The message type. See IMessageProvider
private int messageType = NONE;
+ // Flag to mark if the controls of the sections are currently updated.
+ // While the control are updated, validation and similar logic should
+ // not be processed.
+ // <p>
+ // <b>Note:</b> This flag default to <code>true</code> on instantiation.
+ private boolean updating = true;
+
/**
* Constructor.
*
@@ -263,4 +270,20 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable, public final int getMessageType() {
return messageType;
}
+
+ /**
+ * Marks if or if not the controls of the section are currently updated.
+ */
+ protected final void setIsUpdating(boolean updating) {
+ this.updating = updating;
+ }
+
+ /**
+ * Returns if or if not the controls of the section are currently updated.
+ *
+ * @return <code>True</code> if the controls are currently updated, <code>false</code> otherwise.
+ */
+ protected final boolean isUpdating() {
+ return updating;
+ }
}
|