Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-06-02 11:19:22 -0400
committerChristian W. Damus2015-06-02 12:08:26 -0400
commitc5d5a93494cb5351238de179861dfca20dbaa0bf (patch)
treeef74018fa39908ef4c47efba34d8d32ffb6d86cc
parent61f71fd7e400fffebc469b0857ddae52256a8d8e (diff)
downloadorg.eclipse.papyrus-c5d5a93494cb5351238de179861dfca20dbaa0bf.tar.gz
org.eclipse.papyrus-c5d5a93494cb5351238de179861dfca20dbaa0bf.tar.xz
org.eclipse.papyrus-c5d5a93494cb5351238de179861dfca20dbaa0bf.zip
Bug 468668: [Releng] Nebula TableCombo bundle in Papyrus build has no about.html
https://bugs.eclipse.org/bugs/show_bug.cgi?id=468668 Remove the Nebula TableCombo widget until it has a release that we can ship. Change-Id: I0d6aed021fea8444ba7500b5faf3415f147e76e1 Reviewed-on: https://git.eclipse.org/r/49221 Tested-by: Hudson CI Reviewed-by: Christian W. Damus <give.a.damus@gmail.com>
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature/feature.xml2
-rw-r--r--plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java174
-rwxr-xr-xreleng/top-pom-main.xml4
5 files changed, 116 insertions, 66 deletions
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature/feature.xml
index 777df402bbc..b1071d0a668 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature/feature.xml
@@ -12,8 +12,6 @@ http://www.eclipse.org/legal/epl-v10.html
%license
</license>
- <plugin download-size="0" id="org.eclipse.nebula.widgets.tablecombo" install-size="0" unpack="false" version="0.0.0"/>
-
<plugin download-size="0" id="org.eclipse.papyrus.infra.widgets" install-size="0" unpack="false" version="0.0.0"/>
<plugin download-size="0" id="org.eclipse.papyrus.infra.widgets.toolbox" install-size="0" unpack="false" version="0.0.0"/>
diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui/META-INF/MANIFEST.MF b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui/META-INF/MANIFEST.MF
index 4545e0c3ab0..34e93921c5f 100644
--- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui/META-INF/MANIFEST.MF
+++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui/META-INF/MANIFEST.MF
@@ -28,7 +28,6 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
org.eclipse.ui.ide;bundle-version="3.10.100",
- org.eclipse.nebula.widgets.tablecombo;bundle-version="1.0.0",
org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui;bundle-version="1.1.0"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.papyrus.uml.profile.assistants.generator.ui.internal.Activator
diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/META-INF/MANIFEST.MF b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/META-INF/MANIFEST.MF
index 315b4d862de..6781cf6efff 100644
--- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/META-INF/MANIFEST.MF
+++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/META-INF/MANIFEST.MF
@@ -26,7 +26,6 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
org.eclipse.ui.ide;bundle-version="3.10.100",
- org.eclipse.nebula.widgets.tablecombo;bundle-version="1.0.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.1.0"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui.internal.Activator
diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java
index 3a140931f8d..2c9c1c22402 100644
--- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java
+++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java
@@ -14,22 +14,19 @@
package org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui.internal.wizards;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.preference.JFacePreferences;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.LocalResourceManager;
import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.util.Policy;
import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableColorProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.nebula.jface.tablecomboviewer.TableComboViewer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.papyrus.infra.elementtypesconfigurations.ElementTypeSetConfiguration;
import org.eclipse.papyrus.infra.elementtypesconfigurations.registries.ElementTypeSetConfigurationRegistry;
@@ -37,10 +34,10 @@ import org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui.i
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
@@ -52,8 +49,7 @@ import com.google.common.collect.HashBiMap;
import com.google.common.collect.Ordering;
/**
- * @author damus
- *
+ * Composable block of widgets for selection of the element types set on which to base the generated element types model.
*/
class BaseElementTypeSetBlock {
@@ -63,9 +59,6 @@ class BaseElementTypeSetBlock {
private static final String UML_ELEMENT_TYPE_SET = "org.eclipse.papyrus.uml.service.types.UMLElementTypeSet"; //$NON-NLS-1$
- private static final int COLUMN_NAME = 0;
- private static final int COLUMN_LOCATION = 1;
-
private final GeneratorWizardModel model;
private final BiMap<String, ElementTypeSetConfiguration> elementTypeSets;
@@ -80,14 +73,23 @@ class BaseElementTypeSetBlock {
public void createControl(Composite parent) {
new Label(parent, SWT.NONE).setText("Base element types set:");
- // Use a two-column table because styled label providers don't work in the TableComboViewer
- TableComboViewer combo = new TableComboViewer(parent, SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL);
- combo.getTableCombo().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- combo.getTableCombo().defineColumns(2);
- combo.getTableCombo().setDisplayColumnIndex(0);
-
+ ComboViewer combo = new ComboViewer(new Combo(parent, SWT.READ_ONLY | SWT.DROP_DOWN));
+ combo.setLabelProvider(new DiagramListLabelProvider(parent));
+
+ /*
+ * FIXME(Bug 468668): Reinstate this when we can integrate a new Mars (or later) release of the TableCombo.
+ * cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=468668
+ *
+ * // Use a two-column table because styled label providers don't work in the TableComboViewer
+ * TableComboViewer combo = new TableComboViewer(parent, SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL);
+ * combo.getTableCombo().defineColumns(2);
+ * combo.getTableCombo().setDisplayColumnIndex(0);
+ * combo.setLabelProvider(new DiagramTableLabelProvider(parent));
+ *
+ */
+
+ combo.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
combo.setContentProvider(ArrayContentProvider.getInstance());
- combo.setLabelProvider(new DiagramLabelProvider(parent));
// TableCombo doesn't use a ViewerComparator even when one is set
combo.setInput(getOrdering().sortedCopy(elementTypeSets.values()));
@@ -213,10 +215,10 @@ class BaseElementTypeSetBlock {
// Nested types
//
- private static class DiagramLabelProvider extends LabelProvider implements IStyledLabelProvider, ITableLabelProvider, ITableColorProvider {
+ private static class DiagramListLabelProvider extends LabelProvider implements IStyledLabelProvider {
private ResourceManager images;
- DiagramLabelProvider(Control owner) {
+ DiagramListLabelProvider(Control owner) {
super();
// Because we specify an owner, the owner will take care of clean-up, so we
@@ -226,61 +228,111 @@ class BaseElementTypeSetBlock {
@Override
public StyledString getStyledText(Object element) {
- return new StyledString(getColumnText(element, COLUMN_NAME)) //
- .append(NLS.bind(" - {0}", getColumnText(element, COLUMN_LOCATION)), StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+ ElementTypeSetConfiguration elementTypeSet = (ElementTypeSetConfiguration) element;
+ return new StyledString(getName(elementTypeSet)) //
+ .append(NLS.bind(" - {0}", getLocation(elementTypeSet)), StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
}
@Override
- public String getColumnText(Object element, int column) {
+ public String getText(Object element) {
ElementTypeSetConfiguration elementTypeSet = (ElementTypeSetConfiguration) element;
- String result;
-
- switch (column) {
- case COLUMN_NAME:
- result = getName(elementTypeSet);
- break;
- case COLUMN_LOCATION:
- result = getLocation(elementTypeSet);
- break;
- default:
- throw new IllegalArgumentException("no such column: " + column); //$NON-NLS-1$
- }
-
- return result;
+ return NLS.bind("{0} - {1}", getName(elementTypeSet), getLocation(elementTypeSet));
}
@Override
- public Image getColumnImage(Object element, int column) {
+ public Image getImage(Object element) {
Image result = null;
- if (column == COLUMN_NAME) {
- ElementTypeSetConfiguration set = (ElementTypeSetConfiguration) element;
- URI uri = set.eResource().getURI();
-
- if (uri.isPlatformPlugin()) {
- result = (Image) images.get(Activator.getInstance().getIcon("obj16/plugin.gif")); //$NON-NLS-1$
- } else if (uri.isPlatformResource()) {
- result = (Image) images.get(Activator.getInstance().getIcon("obj16/project.png")); //$NON-NLS-1$
- }
- }
-
- return result;
- }
-
- @Override
- public Color getForeground(Object element, int column) {
- Color result = null;
+ ElementTypeSetConfiguration set = (ElementTypeSetConfiguration) element;
+ URI uri = set.eResource().getURI();
- if (column == COLUMN_LOCATION) {
- result = JFaceResources.getColorRegistry().get(JFacePreferences.QUALIFIER_COLOR);
+ if (uri.isPlatformPlugin()) {
+ result = (Image) images.get(Activator.getInstance().getIcon("obj16/plugin.gif")); //$NON-NLS-1$
+ } else if (uri.isPlatformResource()) {
+ result = (Image) images.get(Activator.getInstance().getIcon("obj16/project.png")); //$NON-NLS-1$
}
return result;
}
-
- @Override
- public Color getBackground(Object element, int columnIndex) {
- return null;
- }
}
+
+ /*
+ * FIXME(Bug 468668): Reinstate this when we can integrate a new Mars (or later) release of the TableCombo.
+ * cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=468668
+ *
+ * private static class DiagramTableLabelProvider extends LabelProvider implements IStyledLabelProvider, ITableLabelProvider, ITableColorProvider {
+ * private static final int COLUMN_NAME = 0;
+ * private static final int COLUMN_LOCATION = 1;
+ *
+ * private ResourceManager images;
+ *
+ * DiagramTableLabelProvider(Control owner) {
+ * super();
+ *
+ * // Because we specify an owner, the owner will take care of clean-up, so we
+ * // don't need a dispose() method of our own
+ * images = new LocalResourceManager(JFaceResources.getResources(), owner);
+ * }
+ *
+ * @Override
+ * public StyledString getStyledText(Object element) {
+ * return new StyledString(getColumnText(element, COLUMN_NAME)) //
+ * .append(NLS.bind(" - {0}", getColumnText(element, COLUMN_LOCATION)), StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+ * }
+ *
+ * @Override
+ * public String getColumnText(Object element, int column) {
+ * ElementTypeSetConfiguration elementTypeSet = (ElementTypeSetConfiguration) element;
+ * String result;
+ *
+ * switch (column) {
+ * case COLUMN_NAME:
+ * result = getName(elementTypeSet);
+ * break;
+ * case COLUMN_LOCATION:
+ * result = getLocation(elementTypeSet);
+ * break;
+ * default:
+ * throw new IllegalArgumentException("no such column: " + column); //$NON-NLS-1$
+ * }
+ *
+ * return result;
+ * }
+ *
+ * @Override
+ * public Image getColumnImage(Object element, int column) {
+ * Image result = null;
+ *
+ * if (column == COLUMN_NAME) {
+ * ElementTypeSetConfiguration set = (ElementTypeSetConfiguration) element;
+ * URI uri = set.eResource().getURI();
+ *
+ * if (uri.isPlatformPlugin()) {
+ * result = (Image) images.get(Activator.getInstance().getIcon("obj16/plugin.gif")); //$NON-NLS-1$
+ * } else if (uri.isPlatformResource()) {
+ * result = (Image) images.get(Activator.getInstance().getIcon("obj16/project.png")); //$NON-NLS-1$
+ * }
+ * }
+ *
+ * return result;
+ * }
+ *
+ * @Override
+ * public Color getForeground(Object element, int column) {
+ * Color result = null;
+ *
+ * if (column == COLUMN_LOCATION) {
+ * result = JFaceResources.getColorRegistry().get(JFacePreferences.QUALIFIER_COLOR);
+ * }
+ *
+ * return result;
+ * }
+ *
+ * @Override
+ * public Color getBackground(Object element, int columnIndex) {
+ * return null;
+ * }
+ * }
+ *
+ */
}
diff --git a/releng/top-pom-main.xml b/releng/top-pom-main.xml
index 60c8f748983..57d4d6fbac6 100755
--- a/releng/top-pom-main.xml
+++ b/releng/top-pom-main.xml
@@ -448,11 +448,13 @@
<layout>p2</layout>
<url>http://download.eclipse.org/nattable/releases/1.2.0/repository/</url>
</repository>
+ <!-- Bug 468668: Reinstate and update this when the TableCombo has a new release for Mars or later.
<repository>
<id>nebula-tablecombo</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/technology/nebula/snapshot/</url>
+ <url>http://download.eclipse.org/technology/nebula/archives/Q12015/release/</url>
</repository>
+ -->
<repository>
<id>orbit</id>
<layout>p2</layout>

Back to the top