Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2019-02-01 09:28:10 -0500
committerQuentin Le Menez2019-02-03 09:12:32 -0500
commit0a4f047c0fcdf411c2dad82726ddc613e341a7cd (patch)
treee3eea5086ceca370bcb34edb47454dc0f06f68a6
parent60b19c362bb6422ad1720b1e5ee49eeedb46cf1a (diff)
downloadorg.eclipse.papyrus-0a4f047c0fcdf411c2dad82726ddc613e341a7cd.tar.gz
org.eclipse.papyrus-0a4f047c0fcdf411c2dad82726ddc613e341a7cd.tar.xz
org.eclipse.papyrus-0a4f047c0fcdf411c2dad82726ddc613e341a7cd.zip
Bug 544044 - [Diagram] Palette is not showing on the class diagram
- added the deleted method and a generated NOT tag until the generator has been fixed - removed the override and defined the palette method as we do not have the palette in the gmfgen anymore Change-Id: I8cec430542882e8a834e425841ff67eb0b3e2c5e Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend67
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditor.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java17
3 files changed, 99 insertions, 2 deletions
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend b/plugins/toolsmiths/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend
index c2882414e10..ec8d467157b 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend
+++ b/plugins/toolsmiths/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend
@@ -89,7 +89,7 @@ public static final String CONTEXT_ID = "«contextID»"; «nonNLS»
«generatedMemberComment»
private org.eclipse.jface.viewers.ISelection getNavigatorSelection() {
- «IF getDiagramTopReference(it) !=null»
+ «IF getDiagramTopReference(it) !==null »
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument document = getDiagramDocument();
«ENDIF»
«xptNavigatorLinkHelper.findSelectionBody(it)»
@@ -111,6 +111,69 @@ override createPaletteRoot (Palette it)'''
}
'''
+// FIXME - This has been overrided to comment the test on the palette tag in the gmfgen
+ override Editor(GenEditorView it) '''
+ «copyright(editorGen)»
+ package «packageName(it)»;
+
+ «generatedClassComment»
+ public class «className(it)» «extendsList(it)» «implementsList(it)» {
+
+ «attributes(it)»
+
+ «constructor(it)»
+
+ «getContextID(it)»
+
+««« «IF editorGen.diagram.palette != null»
+ «createPaletteRoot(editorGen.diagram.palette)»
+««« «ENDIF»
+
+ «getPreferencesHint(it)»
+
+ «getContributorId(it)»
+
+ «getAdapter(it)»
+
+ «getDocumentProvider(it)»
+
+ «getEditingDomain(it)»
+
+ «setDocumentProvider(it)»
+ «IF isIDEMode(it)»
+
+ «gotoMarker(it)»
+
+ «isSaveAsAllowed(it)»
+
+ «doSaveAs(it)»
+
+ «performSaveAs(it)»
+
+ «getShowInContext(it)»
+
+ «IF hasNavigator(it)»
+ «getNavigatorSelection(it.editorGen.navigator)»
+ «ENDIF»
+ «ENDIF»
+
+ «configureGraphicalViewer(it)»
+
+ «IF editorGen.diagram.generateCreateShortcutAction»
+
+ «initializeGraphicalViewer(it)»
+
+ «controlLastClickPositionProviderService»
+
+ «dispose»
+
+ «DropTargetListener(it)»
+ «ENDIF»
+
+ «additions(it)»
+ }
+ '''
+
def createPaletteCustomizer (GenEditorView it)'''
«generatedMemberComment»
protected org.eclipse.gef.ui.palette.PaletteCustomizer createPaletteCustomizer() {
@@ -142,7 +205,6 @@ override additions (GenEditorView it)'''
««« Documentation: (RS) advanced customization abilities
««« « createPaletteCustomizer»
-
« constructPaletteViewer(it)»
« createPaletteviewerProvider(it)»
@@ -152,6 +214,7 @@ override additions (GenEditorView it)'''
«initializeGraphicalViewer(it)»
«selectionChanged(it)»
+
'''
def handlePaletteChange (GenEditorView it) '''
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditor.java
index 2a10afc9ba6..b095187b171 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditor.java
@@ -24,6 +24,7 @@ import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.KeyHandler;
import org.eclipse.gef.Tool;
import org.eclipse.gef.commands.CommandStackListener;
+import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.ui.palette.PaletteViewer;
import org.eclipse.gef.ui.palette.PaletteViewerProvider;
import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
@@ -124,6 +125,22 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @generated
*/
@Override
+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
+ PaletteRoot paletteRoot;
+ if (existingPaletteRoot == null) {
+ paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
+ } else {
+ PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
+ paletteRoot = existingPaletteRoot;
+ }
+ applyCustomizationsToPalette(paletteRoot);
+ return paletteRoot;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected String getContextID() {
return CONTEXT_ID;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java
index 2aab5fc904b..4575533daff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java
@@ -24,6 +24,7 @@ import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.KeyHandler;
import org.eclipse.gef.Tool;
import org.eclipse.gef.commands.CommandStackListener;
+import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.ui.palette.PaletteViewer;
import org.eclipse.gef.ui.palette.PaletteViewerProvider;
import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
@@ -129,6 +130,22 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @generated
*/
@Override
+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
+ PaletteRoot paletteRoot;
+ if (existingPaletteRoot == null) {
+ paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
+ } else {
+ PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
+ paletteRoot = existingPaletteRoot;
+ }
+ applyCustomizationsToPalette(paletteRoot);
+ return paletteRoot;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected PreferencesHint getPreferencesHint() {
return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
}

Back to the top