Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2011-02-22 14:26:04 +0000
committervlorenzo2011-02-22 14:26:04 +0000
commitcb728b45fea83879efa096df6c216ffdb484f860 (patch)
treee128dca547caa9af2138c7bf90ac55b092155549 /incoming
parent0a693592b6dd8a73517a4f2c0ad5e2f730a5cf71 (diff)
downloadorg.eclipse.papyrus-cb728b45fea83879efa096df6c216ffdb484f860.tar.gz
org.eclipse.papyrus-cb728b45fea83879efa096df6c216ffdb484f860.tar.xz
org.eclipse.papyrus-cb728b45fea83879efa096df6c216ffdb484f860.zip
NEW - bug 334240: [Enhancement] [TableEditor] Papyrus shall support Tabular Editors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334240
Diffstat (limited to 'incoming')
-rw-r--r--incoming/org.eclipse.papyrus.table.menu/META-INF/MANIFEST.MF6
-rw-r--r--incoming/org.eclipse.papyrus.table.menu/plugin.xml200
-rw-r--r--incoming/org.eclipse.papyrus.table.menu/src/org/eclipse/papyrus/table/menu/handler/EditTableHandler.java5
3 files changed, 163 insertions, 48 deletions
diff --git a/incoming/org.eclipse.papyrus.table.menu/META-INF/MANIFEST.MF b/incoming/org.eclipse.papyrus.table.menu/META-INF/MANIFEST.MF
index 669d933cdc2..e83ede26135 100644
--- a/incoming/org.eclipse.papyrus.table.menu/META-INF/MANIFEST.MF
+++ b/incoming/org.eclipse.papyrus.table.menu/META-INF/MANIFEST.MF
@@ -7,14 +7,14 @@ Bundle-Activator: org.eclipse.papyrus.table.menu.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.expressions,
- org.eclipse.papyrus.table.common,
+ org.eclipse.papyrus.table.default,
org.eclipse.papyrus.core,
org.eclipse.papyrus.diagram.common,
org.eclipse.papyrus.diagram.menu,
org.eclipse.emf.facet.widgets.nattable,
- org.eclipse.emf.facet.widgets.nattable.workbench;bundle-version="0.1.0",
org.eclipse.emf.facet.widgets.nattable.instance;bundle-version="0.1.0",
- org.eclipse.emf.facet.infra.common.core;bundle-version="0.1.0"
+ org.eclipse.emf.facet.infra.common.core;bundle-version="0.1.0",
+ org.eclipse.papyrus.table.common;bundle-version="0.8.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.table.menu,
org.eclipse.papyrus.table.menu.actions,
diff --git a/incoming/org.eclipse.papyrus.table.menu/plugin.xml b/incoming/org.eclipse.papyrus.table.menu/plugin.xml
index b3f009f6de3..2b3e833189b 100644
--- a/incoming/org.eclipse.papyrus.table.menu/plugin.xml
+++ b/incoming/org.eclipse.papyrus.table.menu/plugin.xml
@@ -199,6 +199,10 @@
</with>
</visibleWhen>
</command>
+ <command
+ commandId="org.eclipse.papyrus.table.menu.sort.name.command"
+ style="push">
+ </command>
<separator
name="org.eclipse.papyrus.table.menu.separator"
visible="true">
@@ -261,65 +265,170 @@
</menuContribution>
<menuContribution
allPopups="false"
- locationURI="toolbar:org.eclipse.emf.facet.widgets.nattable.workbench.editor.NatTableEditor.toolbar">
- <separator
- name="org.eclipse.papyrus.table.menu.separator1"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.emf.facet.widget.nattable.common.columns.command"
- icon="icons/not_NA.png"
- id="org.eclipse.papyrus.table.toolbar.common.column"
- label="&amp;Show only the common columns"
- style="toggle"
- tooltip="Show only the common columns">
- <visibleWhen
- checkEnabled="false">
- <and>
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+ <toolbar
+ id="org.eclipse.papyrus.table.toolbar">
+ <command
+ commandId="org.eclipse.emf.facet.widgets.nattable.createNewElementCommand"
+ icon="IMG_OBJ_ADD"
+ style="pulldown"
+ tooltip="%create.new.element">
+ <visibleWhen
+ checkEnabled="false">
<with
variable="selection">
<test
forcePluginActivation="true"
- property="org.eclipse.papyrus.table.menu.providers.TableTester.isTable"
+ property="org.eclipse.emf.facet.widgets.nattable.workbench.tableSelectionTester.isTable"
value="true">
</test>
</with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.emf.facet.widgets.nattable.exportCommand"
+ icon="platform:/plugin/org.eclipse.emf.facet.widgets.nattable.workbench/icons/export.gif"
+ style="push"
+ tooltip="Export as XMI File">
+ <visibleWhen
+ checkEnabled="false">
<with
- variable="activeEditor">
- <instanceof
- value="org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor">
- </instanceof>
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.emf.facet.widgets.nattable.workbench.tableSelectionTester.isTable"
+ value="true">
+ </test>
</with>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.emf.facet.widget.nattable.empty.columns.command"
- icon="icons/empty.png"
- id="org.eclipse.papyrus.table.toolbar.hide.empty.column"
- label="&amp;Hide the empty columns"
- style="toggle"
- tooltip="Hide the empty columns">
- <visibleWhen
- checkEnabled="false">
- <and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.emf.facet.widgets.nattable.loadCustomizationCommand"
+ icon="platform:/plugin/org.eclipse.emf.facet.widgets.nattable.workbench/icons/uiCustom.gif"
+ style="push"
+ tooltip="Load a Customization">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.emf.facet.widgets.nattable.workbench.tableSelectionTester.isTable"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.emf.facet.widgets.nattable.loadFacetCommand"
+ icon="platform:/plugin/org.eclipse.emf.facet.widgets.nattable.workbench/icons/facet.gif"
+ style="push"
+ tooltip="Load an EMF Facet">
+ <visibleWhen
+ checkEnabled="false">
<with
variable="selection">
<test
forcePluginActivation="true"
- property="org.eclipse.papyrus.table.menu.providers.TableTester.isTable"
+ property="org.eclipse.emf.facet.widgets.nattable.workbench.tableSelectionTester.isTable"
value="true">
</test>
</with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.emf.facet.widgets.nattable.hideColumnCommand"
+ icon="icons/select_column_to_hide_2.png"
+ style="push"
+ tooltip="Select Columns To Hide">
+ <visibleWhen
+ checkEnabled="false">
<with
- variable="activeEditor">
- <instanceof
- value="org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor">
- </instanceof>
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.emf.facet.widgets.nattable.workbench.tableSelectionTester.isTable"
+ value="true">
+ </test>
</with>
- </and>
- </visibleWhen>
- </command>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.emf.facet.widgets.nattable.sortColumnByTypeCommand"
+ icon="platform:/plugin/org.eclipse.emf.facet.widgets.nattable.workbench/icons/sort_links_by_type.gif"
+ style="push"
+ tooltip="Sort Columns By Type">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.emf.facet.widgets.nattable.workbench.tableSelectionTester.isTable"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="org.eclipse.papyrus.table.menu.separator1"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.emf.facet.widget.nattable.common.columns.command"
+ icon="icons/not_NA.png"
+ id="org.eclipse.papyrus.table.toolbar.common.column"
+ label="&amp;Show only the common columns"
+ style="toggle"
+ tooltip="Show only the common columns">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.table.menu.providers.TableTester.isTable"
+ value="true">
+ </test>
+ </with>
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor">
+ </instanceof>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.emf.facet.widget.nattable.empty.columns.command"
+ icon="icons/empty.png"
+ id="org.eclipse.papyrus.table.toolbar.hide.empty.column"
+ label="&amp;Hide the empty columns"
+ style="toggle"
+ tooltip="Hide the empty columns">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.table.menu.providers.TableTester.isTable"
+ value="true">
+ </test>
+ </with>
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor">
+ </instanceof>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </toolbar>
</menuContribution>
</extension>
<extension
@@ -331,5 +440,12 @@
properties="isTable"
type="org.eclipse.jface.viewers.IStructuredSelection">
</propertyTester>
- </extension>
+ </extension>
+
+
+
+
+
+
+
</plugin>
diff --git a/incoming/org.eclipse.papyrus.table.menu/src/org/eclipse/papyrus/table/menu/handler/EditTableHandler.java b/incoming/org.eclipse.papyrus.table.menu/src/org/eclipse/papyrus/table/menu/handler/EditTableHandler.java
index 10dc849fc11..c8b1bc6836d 100644
--- a/incoming/org.eclipse.papyrus.table.menu/src/org/eclipse/papyrus/table/menu/handler/EditTableHandler.java
+++ b/incoming/org.eclipse.papyrus.table.menu/src/org/eclipse/papyrus/table/menu/handler/EditTableHandler.java
@@ -58,8 +58,8 @@ public class EditTableHandler extends AbstractHandler {
INatTableWidgetProvider natTableWidgetPart = (INatTableWidgetProvider)activePart.getAdapter(INatTableWidgetProvider.class);
if(natTableWidgetPart != null) {
- if(activePart instanceof IEditingDomainProvider) {
- IEditingDomainProvider editingDomainProvider = (IEditingDomainProvider)activePart;
+ if(natTableWidgetPart instanceof IEditingDomainProvider) {
+ IEditingDomainProvider editingDomainProvider = (IEditingDomainProvider)natTableWidgetPart;
EditingDomain editingDomain = editingDomainProvider.getEditingDomain();
TableInstance tableInstance = natTableWidgetPart.getNatTableWidget().getTableInstance();
String currentDescription = tableInstance.getDescription();
@@ -75,5 +75,4 @@ public class EditTableHandler extends AbstractHandler {
}
return null;
}
-
}

Back to the top