From 091729426d676de36b3053466812578cb5b7183e Mon Sep 17 00:00:00 2001 From: Laurent Wouters Date: Fri, 4 Apr 2014 16:08:14 +0200 Subject: [clean] Retiring org.eclipse.papyrus.constraintwithessentialocl.editor.xtext Signed-off-by: Laurent Wouters --- .../.classpath | 7 - .../.project | 28 --- .../.settings/org.eclipse.jdt.core.prefs | 12 -- .../META-INF/MANIFEST.MF | 23 --- .../about.html | 28 --- .../build.properties | 7 - .../icons/OCLModelFile.gif | Bin 558 -> 0 bytes .../plugin.xml | 17 -- .../papyrus/EssentialOCLPartialModelEditor.java | 52 ----- .../EssentialOCLPopupEditorConfiguration.java | 209 --------------------- .../xtext/papyrus/EssentialOCLPopupPlugin.java | 70 ------- .../papyrus/EssentialOCLPopupRuntimeModule.java | 25 --- .../xtext/papyrus/EssentialOCLPopupUiModule.java | 29 --- .../xtext/papyrus/IXtextEMFReconciler2.java | 24 --- 14 files changed, 531 deletions(-) delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.classpath delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.project delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.settings/org.eclipse.jdt.core.prefs delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/META-INF/MANIFEST.MF delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/about.html delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/build.properties delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/icons/OCLModelFile.gif delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/plugin.xml delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPartialModelEditor.java delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupEditorConfiguration.java delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupPlugin.java delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupRuntimeModule.java delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupUiModule.java delete mode 100644 deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/IXtextEMFReconciler2.java diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.classpath b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.project b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.project deleted file mode 100644 index 58744a0a5c3..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.constraintwithessentialocl.editor.xtext - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6b0e4a20312..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -#Wed May 18 14:49:57 CEST 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/META-INF/MANIFEST.MF deleted file mode 100644 index 2d6f47c1488..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.extensionpoints.editors;bundle-version="0.9.0", - org.eclipse.xtext.gmf.glue, - com.google.inject;bundle-version="2.0.0", - org.eclipse.uml2.uml;bundle-version="3.2.0", - org.eclipse.ocl.examples.xtext.essentialocl.ui;bundle-version="3.1.0", - org.eclipse.gef;bundle-version="3.7.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", - org.eclipse.papyrus.properties.runtime;bundle-version="0.9.0", - org.eclipse.papyrus.core;bundle-version="0.9.0", - org.eclipse.core.expressions -Bundle-ActivationPolicy: lazy -Bundle-Version: 0.9.0.qualifier -Bundle-Name: Papyrus -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.ocl.examples.xtext.papyrus.EssentialOCLP - opupPlugin -Bundle-SymbolicName: org.eclipse.papyrus.constraintwithessentialocl.ed - itor.xtext;singleton:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/about.html b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - - diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/build.properties b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/build.properties deleted file mode 100644 index 4b9cf3663a1..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -# -#Thu Sep 15 16:42:18 CEST 2011 -bin.includes=META-INF/,.,plugin.xml,about.html -output..=bin/ -src.includes=META-INF/,.,plugin.xml,about.html -source..=src/ -bin..=bin/ diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/icons/OCLModelFile.gif b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/icons/OCLModelFile.gif deleted file mode 100644 index 2945103032e..00000000000 Binary files a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/icons/OCLModelFile.gif and /dev/null differ diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/plugin.xml b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/plugin.xml deleted file mode 100644 index 2db8823f50f..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/plugin.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - s - - diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPartialModelEditor.java b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPartialModelEditor.java deleted file mode 100644 index 2ffe27451b5..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPartialModelEditor.java +++ /dev/null @@ -1,52 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * - * - * 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: - * E.D.Willink - Initial API and implementation - * CEA LIST - Architecture refactoring - * - *****************************************************************************/ - -package org.eclipse.ocl.examples.xtext.papyrus; - -import java.util.Collections; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.text.source.SourceViewer; -import org.eclipse.xtext.gmf.glue.edit.part.IXtextEMFReconciler; -import org.eclipse.xtext.gmf.glue.partialEditing.ISyntheticResourceProvider; -import org.eclipse.xtext.gmf.glue.partialEditing.PartialModelEditor; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.util.StringInputStream; - -public class EssentialOCLPartialModelEditor extends PartialModelEditor { - - public EssentialOCLPartialModelEditor(SourceViewer viewer, - ISyntheticResourceProvider resourceProvider, - boolean insertLineBreaks, - EObject semanticElement, - IXtextEMFReconciler modelReconciler) { - super(viewer, resourceProvider, insertLineBreaks, semanticElement, modelReconciler); - } - - @Override - public XtextResource createResource(String content) { - XtextResource result = resourceProvider.createResource(); - if (modelReconciler instanceof IXtextEMFReconciler2) { - ((IXtextEMFReconciler2)modelReconciler).configureResource(result, semanticElement); - } - try { - result.load(new StringInputStream(content, result.getEncoding()), Collections.emptyMap()); - } catch (Exception e) { - throw new RuntimeException(e); - } - return result; - } - -} diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupEditorConfiguration.java b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupEditorConfiguration.java deleted file mode 100644 index 3b9f599bc63..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupEditorConfiguration.java +++ /dev/null @@ -1,209 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * - * - * 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: - * E.D.Willink - Initial API and implementation - * CEA LIST - Architecture refactoring - * - *****************************************************************************/ - -package org.eclipse.ocl.examples.xtext.papyrus; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.operations.OperationHistoryFactory; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.gmf.runtime.common.core.command.CommandResult; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.ocl.examples.pivot.evaluation.EvaluationContext; -import org.eclipse.ocl.examples.pivot.uml.UML2Ecore2Pivot; -import org.eclipse.ocl.examples.pivot.utilities.TypeManager; -import org.eclipse.ocl.examples.pivot.utilities.TypeManagerResourceAdapter; -import org.eclipse.ocl.examples.xtext.essentialocl.utilities.EssentialOCLPlugin; -import org.eclipse.papyrus.core.utils.EditorUtils; -import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; -import org.eclipse.uml2.uml.Constraint; -import org.eclipse.uml2.uml.LiteralString; -import org.eclipse.uml2.uml.UMLFactory; -import org.eclipse.xtext.gmf.glue.edit.part.DefaultXtextSemanticValidator; -import org.eclipse.xtext.gmf.glue.edit.part.IXTextSemanticValidator; -import org.eclipse.xtext.gmf.glue.edit.part.IXtextEMFReconciler; -import org.eclipse.xtext.gmf.glue.edit.part.PopupXtextEditorHelper; -import org.eclipse.xtext.gmf.glue.partialEditing.SourceViewerHandle; -import org.eclipse.xtext.resource.XtextResource; - -import com.google.inject.Injector; - -public class EssentialOCLPopupEditorConfiguration extends org.eclipse.xtext.gmf.glue.PopupEditorConfiguration -{ - public class Reconciler implements IXtextEMFReconciler2 - { - public void configureResource(XtextResource resource, EObject umlObject) { - if (resource instanceof EvaluationContext) { - TypeManagerResourceAdapter.getAdapter(resource, typeManager); - org.eclipse.ocl.examples.pivot.Element pivotElement = getPivotModel(umlObject); - if (pivotElement instanceof org.eclipse.ocl.examples.pivot.NamedElement) { - ((EvaluationContext)resource).setContext((org.eclipse.ocl.examples.pivot.NamedElement)pivotElement, null); - } - } - } - - public void reconcile(EObject modelObject, EObject xtextObject) { - if (!(modelObject instanceof org.eclipse.uml2.uml.Constraint)) { - return; - } - String newTextualRepresentation = editorHelper.getSourceViewerHandle().getDocument().get() ; - // - // Creates and executes the update command - // - UpdateConstraintCommand updateCommand = new UpdateConstraintCommand((org.eclipse.uml2.uml.Constraint)modelObject, newTextualRepresentation); - try { - OperationHistoryFactory.getOperationHistory().execute(updateCommand, new NullProgressMonitor(), null); - } catch (ExecutionException e) { - /* [AC] TODO AC => check why LogHelper is not visible - * org.eclipse.papyrus.properties.runtime.Activator.log.error(e); - */ - e.printStackTrace() ; - } - // - } - } - - protected class UpdateConstraintCommand extends AbstractTransactionalCommand - { - protected final org.eclipse.uml2.uml.Constraint constraint; - protected final String newTextualRepresentation; - - public UpdateConstraintCommand(org.eclipse.uml2.uml.Constraint constraint, String newTextualRepresentation) { - super(EditorUtils.getTransactionalEditingDomain(), "Constraint Update", getWorkspaceFiles(constraint)); - this.constraint = constraint; - this.newTextualRepresentation = newTextualRepresentation; - } - - @Override - protected CommandResult doExecuteWithResult(IProgressMonitor arg0, IAdaptable arg1) throws ExecutionException { - org.eclipse.uml2.uml.OpaqueExpression opaqueExpression = null ; - int indexOfOCLBody = -1 ; - if (constraint.getSpecification() == null || !(constraint.getSpecification() instanceof org.eclipse.uml2.uml.OpaqueExpression)) - opaqueExpression = UMLFactory.eINSTANCE.createOpaqueExpression() ; - else { - opaqueExpression = (org.eclipse.uml2.uml.OpaqueExpression)constraint.getSpecification() ; - for (int i = 0 ; i < opaqueExpression.getLanguages().size() && indexOfOCLBody == -1 ; i++) { - if (opaqueExpression.getLanguages().get(i).equals("OCL")) - indexOfOCLBody = i ; - } - } - if (indexOfOCLBody == -1) { - opaqueExpression.getLanguages().add("OCL") ; - opaqueExpression.getBodies().add(newTextualRepresentation) ; - } - else { - opaqueExpression.getBodies().remove(indexOfOCLBody) ; - opaqueExpression.getBodies().add(indexOfOCLBody, newTextualRepresentation) ; - } - constraint.setSpecification(opaqueExpression) ; - return CommandResult.newOKCommandResult(constraint); - } - } - - protected PopupXtextEditorHelper editorHelper = null ; - private TypeManager typeManager = null; - - public EssentialOCLPopupEditorConfiguration() {} - - @Override - public IPopupEditorHelper createPopupEditorHelper(Object editPart) { - if (!(editPart instanceof IGraphicalEditPart)) { - return null; - } - IGraphicalEditPart graphicalEditPart = (IGraphicalEditPart)editPart; - Object model = graphicalEditPart.getModel(); - if (model == null) { - return null; - } - if (!(model instanceof View)) { - return null; - } - View view = (View) model; - EObject element = view.getElement(); - if (element == null) { - return null; - } - if (!(element instanceof org.eclipse.uml2.uml.Constraint)) { - return null; - } - org.eclipse.uml2.uml.Constraint constraint = (org.eclipse.uml2.uml.Constraint) element; - org.eclipse.uml2.uml.ValueSpecification specification = constraint.getSpecification(); - if (specification == null) { - return null; - } - if (!(specification instanceof org.eclipse.uml2.uml.LiteralString || specification instanceof org.eclipse.uml2.uml.OpaqueExpression)) { - return null; - } - getPivotModel(constraint); - Injector xtextInjector = EssentialOCLPopupPlugin.getInstance().getInjector(EssentialOCLPlugin.LANGUAGE_ID); - IXtextEMFReconciler modelReconciler = new Reconciler(); - String textToEdit = getTextToEdit(element); - String fileExtension = "essentialocl"; - IXTextSemanticValidator semanticValidator = new DefaultXtextSemanticValidator(); - SourceViewerHandle.bindPartialModelEditorClass(EssentialOCLPartialModelEditor.class) ; - editorHelper = (PopupXtextEditorHelper)super.createPopupEditorHelper(graphicalEditPart, xtextInjector, modelReconciler, textToEdit, fileExtension, semanticValidator); - return editorHelper ; - } - - protected org.eclipse.ocl.examples.pivot.Element getPivotModel(EObject umlObject) { - if (!(umlObject instanceof org.eclipse.uml2.uml.Constraint)) { - return null; - } - Resource umlResource = umlObject.eResource(); - if (umlResource == null) { - return null; - } - if (typeManager == null) { - typeManager = new TypeManager(); - } - UML2Ecore2Pivot adapter = UML2Ecore2Pivot.getAdapter(umlResource, typeManager); - adapter.getPivotRoot(); - org.eclipse.uml2.uml.Namespace umlContainer = ((org.eclipse.uml2.uml.Constraint)umlObject).getContext(); - if (umlContainer instanceof org.eclipse.uml2.uml.Operation) { - umlContainer = ((org.eclipse.uml2.uml.Operation)umlObject).getNamespace(); - } - return adapter.getCreated(org.eclipse.ocl.examples.pivot.Element.class, umlContainer); - } - - @Override - public String getTextToEdit(Object editedObject) { - Constraint umlConstraint = (Constraint)editedObject ; - String value = "" ; - if (umlConstraint.getSpecification() != null) { - if (umlConstraint.getSpecification() instanceof LiteralString) { - if (((LiteralString)umlConstraint.getSpecification()).getValue() != null) - value += ((LiteralString)umlConstraint.getSpecification()).getValue() ; - } - else if (umlConstraint.getSpecification() instanceof org.eclipse.uml2.uml.OpaqueExpression) { - int indexOfOCLBody = -1 ; - org.eclipse.uml2.uml.OpaqueExpression opaqueExpression = (org.eclipse.uml2.uml.OpaqueExpression)umlConstraint.getSpecification() ; - for (int i = 0 ; - i < opaqueExpression.getLanguages().size() && indexOfOCLBody == -1 ; - i ++) { - if (opaqueExpression.getLanguages().get(i).equals("OCL")) { - value += opaqueExpression.getBodies().get(i) ; - indexOfOCLBody = i ; - } - } - } - } - return value; - } -} diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupPlugin.java b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupPlugin.java deleted file mode 100644 index e6a5e8f0dc6..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupPlugin.java +++ /dev/null @@ -1,70 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * - * - * 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: - * E.D.Willink - Initial API and implementation - * CEA LIST - Architecture refactoring - * - *****************************************************************************/ - -package org.eclipse.ocl.examples.xtext.papyrus; - -import org.eclipse.ocl.examples.xtext.essentialocl.ui.internal.EssentialOCLActivator; -import org.eclipse.ocl.examples.xtext.essentialocl.utilities.EssentialOCLPlugin; - -import com.google.inject.Module; - -/** - * The main plugin class to be used in the desktop. - */ -public class EssentialOCLPopupPlugin extends EssentialOCLActivator -{ - // The shared instance. - private static EssentialOCLPopupPlugin plugin; - - /** - * Returns the shared instance. - */ - public static EssentialOCLPopupPlugin getInstance() { - return plugin; - } - - /** - * Obtains my plug-in ID. - * - * @return my plug-in ID - */ - public static String getPluginId() { - return getInstance().getBundle().getSymbolicName(); - } - - /** - * The constructor. - */ - public EssentialOCLPopupPlugin() { - super(); - plugin = this; - } - - protected Module getRuntimeModule(String grammar) { - if (EssentialOCLPlugin.LANGUAGE_ID.equals(grammar)) { - return new EssentialOCLPopupRuntimeModule(); - } - - throw new IllegalArgumentException(grammar); - } - - protected Module getUiModule(String grammar) { - if (EssentialOCLPlugin.LANGUAGE_ID.equals(grammar)) { - return new EssentialOCLPopupUiModule(this); - } - - throw new IllegalArgumentException(grammar); - } -} diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupRuntimeModule.java b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupRuntimeModule.java deleted file mode 100644 index a6140a009e9..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupRuntimeModule.java +++ /dev/null @@ -1,25 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * - * - * 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: - * E.D.Willink - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.ocl.examples.xtext.papyrus; - -import org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLRuntimeModule; - -/** - * Use this class to register components to be used within the IDE. - */ -public class EssentialOCLPopupRuntimeModule extends EssentialOCLRuntimeModule -{ - -} diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupUiModule.java b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupUiModule.java deleted file mode 100644 index ec90a08abd0..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/EssentialOCLPopupUiModule.java +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * - * - * 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: - * E.D.Willink - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.ocl.examples.xtext.papyrus; - -import org.eclipse.ocl.examples.xtext.essentialocl.ui.EssentialOCLUiModule; -import org.eclipse.ui.plugin.AbstractUIPlugin; - -/** - * Use this class to register components to be used within the IDE. - */ -public class EssentialOCLPopupUiModule extends EssentialOCLUiModule -{ - public EssentialOCLPopupUiModule(AbstractUIPlugin plugin) { - super(plugin); - } - -} diff --git a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/IXtextEMFReconciler2.java b/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/IXtextEMFReconciler2.java deleted file mode 100644 index 8ffc92baecb..00000000000 --- a/deprecated/org.eclipse.papyrus.constraintwithessentialocl.editor.xtext/src/org/eclipse/ocl/examples/xtext/papyrus/IXtextEMFReconciler2.java +++ /dev/null @@ -1,24 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * - * - * 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: - * E.D.Willink - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.ocl.examples.xtext.papyrus; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.xtext.gmf.glue.edit.part.IXtextEMFReconciler; -import org.eclipse.xtext.resource.XtextResource; - -public interface IXtextEMFReconciler2 extends IXtextEMFReconciler -{ - void configureResource(XtextResource result, EObject semanticElement); -} -- cgit v1.2.3