diff options
Diffstat (limited to 'plugins/developer')
4 files changed, 71 insertions, 88 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.codegen/src/org/eclipse/papyrus/codegen/PapyrusCodegenEmitters.java b/plugins/developer/org.eclipse.papyrus.codegen/src/org/eclipse/papyrus/codegen/PapyrusCodegenEmitters.java index 99de3f70922..bccb252287a 100644 --- a/plugins/developer/org.eclipse.papyrus.codegen/src/org/eclipse/papyrus/codegen/PapyrusCodegenEmitters.java +++ b/plugins/developer/org.eclipse.papyrus.codegen/src/org/eclipse/papyrus/codegen/PapyrusCodegenEmitters.java @@ -1,40 +1,45 @@ -/****************************************************************************
- * Copyright (c) 2008 Atos Origin.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thibault Landre (Atos Origin) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.codegen;
-
-import org.eclipse.gmf.codegen.xtend.ui.handlers.CodegenEmittersWithXtend2;
-import org.eclipse.gmf.common.UnexpectedBehaviourException;
-import org.eclipse.gmf.internal.common.codegen.JavaClassEmitter;
-
-@SuppressWarnings("restriction")
-public class PapyrusCodegenEmitters extends CodegenEmittersWithXtend2 {
-
- public PapyrusCodegenEmitters(boolean useBaseTemplatesOnly, String templateDirectory, boolean includeDynamicModelTemplates) {
- super(useBaseTemplatesOnly, templateDirectory, includeDynamicModelTemplates);
- }
-
- @Override
- public JavaClassEmitter getModelingAssistantProviderEmitter() throws UnexpectedBehaviourException {
- return null;
- }
-
- @Override
- public JavaClassEmitter getNodeEditPartModelingAssistantProviderEmitter() {
- return null;
- }
-
- @Override
- public JavaClassEmitter getDeleteElementActionEmitter() {
- return null;
- }
-}
+/**************************************************************************** + * Copyright (c) 2008 Atos Origin. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Thibault Landre (Atos Origin) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.codegen; + +import org.eclipse.gmf.codegen.xtend.ui.handlers.CodegenEmittersWithXtend2; +import org.eclipse.gmf.common.UnexpectedBehaviourException; +import org.eclipse.gmf.internal.common.codegen.JavaClassEmitter; + +@SuppressWarnings("restriction") +public class PapyrusCodegenEmitters extends CodegenEmittersWithXtend2 { + + public PapyrusCodegenEmitters(boolean useBaseTemplatesOnly, String templateDirectory, boolean includeDynamicModelTemplates) { + super(useBaseTemplatesOnly, templateDirectory, includeDynamicModelTemplates); + } + + @Override + public JavaClassEmitter getModelingAssistantProviderEmitter() throws UnexpectedBehaviourException { + return null; + } + + @Override + public JavaClassEmitter getUpdateCommandEmitter() { + return null; + } + + @Override + public JavaClassEmitter getNodeEditPartModelingAssistantProviderEmitter() { + return null; + } + + @Override + public JavaClassEmitter getDeleteElementActionEmitter() { + return null; + } +} diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/updater/.gitignore b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/updater/.gitignore index 3819cbf1bdf..fd5fcc747d8 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/updater/.gitignore +++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/updater/.gitignore @@ -1,2 +1,2 @@ /DiagramUpdater.java -/UpdateCommand.java +/Extensions.java diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/Extensions.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/Extensions.xtend new file mode 100644 index 00000000000..caf2ddec7ba --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/Extensions.xtend @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2007, 2009 Borland Software Corporation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Alexander Shatalin (Borland) - initial API and implementation + * Gabriel Pascual (ALL4TEC) - Bug 372322 + */ +package aspects.xpt.diagram.updater + +import com.google.inject.Singleton +import org.eclipse.gmf.codegen.gmfgen.GenDiagramUpdater + +@Singleton class Extensions extends xpt.diagram.updater.extensions{ + + override def extensions(GenDiagramUpdater it) { + // Override Refresh contribution + } + +} + diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/UpdateCommand.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/UpdateCommand.xtend deleted file mode 100644 index e8238331560..00000000000 --- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/UpdateCommand.xtend +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) 2007, 2009, 2013 Borland Software Corporation and others - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Alexander Shatalin (Borland) - initial API and implementation - * Michael Golubev (Montages) - #386838 - migrate to Xtend2 - */ -package aspects.xpt.diagram.updater
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenDiagramUpdater
-import xpt.Common
-
-@Singleton class UpdateCommand extends xpt.diagram.updater.UpdateCommand { - @Inject extension Common; - - - - override def execute(GenDiagramUpdater it) ''' - «generatedMemberComment» - public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException { - org.eclipse.jface.viewers.ISelection selection = org.eclipse.ui.PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); - if (selection instanceof org.eclipse.jface.viewers.IStructuredSelection) { - org.eclipse.jface.viewers.IStructuredSelection structuredSelection = (org.eclipse.jface.viewers.IStructuredSelection) selection; - if (structuredSelection.size() != 1) { - return null; - } - if (structuredSelection.getFirstElement() instanceof org.eclipse.gef.EditPart && ((org.eclipse.gef.EditPart) structuredSelection.getFirstElement()).getModel() instanceof org.eclipse.gmf.runtime.notation.View) { - org.eclipse.emf.ecore.EObject modelElement = ((org.eclipse.gmf.runtime.notation.View) ((org.eclipse.gef.EditPart) structuredSelection.getFirstElement()).getModel()).getElement(); - java.util.List<?> editPolicies = org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy.getRegisteredEditPolicies(modelElement); - for (java.util.Iterator<?> it = editPolicies.iterator(); it.hasNext();) { - org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy nextEditPolicy = (org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy) it.next(); - nextEditPolicy.refresh(); - } - - } - } - return null; - } - ''' -} |