Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Roth2015-05-04 08:34:03 +0000
committerMickael Istria2016-07-04 09:27:48 +0000
commitfadddbdc53bffee0c072dc97c7a7ac2519ffac6b (patch)
treef1392c8f5fe15ec2b2b0372cf704af1ce5c64d3d
parent20d43d5fd4881832b512e8c30f1ee9d7837ada23 (diff)
downloadeclipse.platform.ui-fadddbdc53bffee0c072dc97c7a7ac2519ffac6b.tar.gz
eclipse.platform.ui-fadddbdc53bffee0c072dc97c7a7ac2519ffac6b.tar.xz
eclipse.platform.ui-fadddbdc53bffee0c072dc97c7a7ac2519ffac6b.zip
Bug 33184 - [Contributions] updating: Separator should return
isEnabled() == false Change AbstractGroupMarker isEnabled to return true, as Group markers (e.g. Separators) are not meant to be actionable. Change-Id: I5a14fe62e8770ae02976cddb94f8b102bbaa8c8f Signed-off-by: Robert Roth <robert.roth.off@gmail.com>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/action/AbstractGroupMarker.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/action/AbstractGroupMarker.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/action/AbstractGroupMarker.java
index 13ca8835f69..691f73fbc2e 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/action/AbstractGroupMarker.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/action/AbstractGroupMarker.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Robert Roth <robert.roth.off@gmail.com> - bug 33184
*******************************************************************************/
package org.eclipse.jface.action;
@@ -48,11 +49,21 @@ public abstract class AbstractGroupMarker extends ContributionItem {
}
/**
- * The <code>AbstractGroupMarker</code> implementation of this <code>IContributionItem</code>
- * method returns <code>true</code> iff the id is not <code>null</code>. Subclasses may override.
+ * Always return <code>false</code> as group markers (including separators)
+ * are only there for visual separation, not meant to be actionable.
*/
@Override
- public boolean isGroupMarker() {
+ public boolean isEnabled() {
+ return false;
+ }
+
+ /**
+ * The <code>AbstractGroupMarker</code> implementation of this
+ * <code>IContributionItem</code> method returns <code>true</code> iff the
+ * id is not <code>null</code>. Subclasses may override.
+ */
+ @Override
+ public boolean isGroupMarker() {
return getId() != null;
}
}

Back to the top