Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCornel Izbasa2014-06-03 18:39:14 +0000
committerDani Megert2014-08-05 12:00:18 +0000
commit8e2e1d40c93ecd97446c1def3ac1f4ea4c09cb2a (patch)
tree927f1abde6dca49e65d47b20a025f5b132dbe636 /org.eclipse.ui.intro.universal
parentb63f6ef06f975d6b72d6466f604e5c70eac912a6 (diff)
downloadeclipse.platform.ua-8e2e1d40c93ecd97446c1def3ac1f4ea4c09cb2a.tar.gz
eclipse.platform.ua-8e2e1d40c93ecd97446c1def3ac1f4ea4c09cb2a.tar.xz
eclipse.platform.ua-8e2e1d40c93ecd97446c1def3ac1f4ea4c09cb2a.zip
Bug 420843 - Unwanted items in the Customize functionality on the Intro
page of Eclipse RCP Update after review: https://git.eclipse.org/r/#/c/20183/ Change-Id: I455d6ed55d906913bff27810303242a0a3df65e2 Signed-off-by: Cornel Izbasa <cizbasa@info.uvt.ro>
Diffstat (limited to 'org.eclipse.ui.intro.universal')
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java
index 5c3b029d4..b4d70dd4c 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Cornel Izbasa <cizbasa@info.uvt.ro> - Removed unwanted items in the Customize functionality on the Intro - https://bugs.eclipse.org/420843
*******************************************************************************/
package org.eclipse.ui.internal.intro.universal;
@@ -48,6 +49,7 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.dnd.DND;
@@ -163,7 +165,11 @@ public class CustomizationContentsArea {
this.name = name;
this.nameNoMnemonic = nameNoMnemonic;
}
-
+
+ public String getId() {
+ return id;
+ }
+
public String getName() {
return name;
}
@@ -888,6 +894,21 @@ public class CustomizationContentsArea {
rootPages = CheckboxTableViewer.newCheckList(container, SWT.BORDER);
rootPages.setContentProvider(contentProvider);
rootPages.setLabelProvider(labelProvider);
+ // Filter empty pages
+ ViewerFilter[] rootPageFilters = new ViewerFilter[] {
+ new ViewerFilter() {
+ public boolean select(Viewer viewer, Object parentElement,
+ Object element) {
+ if (element instanceof RootPage) {
+ RootPage rootPageElement = (RootPage) element;
+ String rootPageId = rootPageElement.getId();
+ return (introData.getPage(rootPageId) != null);
+ }
+ return false;
+ }
+ }
+ };
+ rootPages.setFilters(rootPageFilters);
gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
gd.horizontalSpan = 2;
rootPages.getControl().setLayoutData(gd);

Back to the top