Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2017-01-20 19:13:03 +0000
committerEike Stepper2017-01-20 19:13:03 +0000
commitf544af72e295d94c34831a08ea51ef8311825a1e (patch)
treefc73f839e1d90ed519aa001538f7f1f89702f7e4 /plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src
parent4987569be61bff7ce5e7379401ef47e7155c9237 (diff)
downloadcdo-f544af72e295d94c34831a08ea51ef8311825a1e.tar.gz
cdo-f544af72e295d94c34831a08ea51ef8311825a1e.tar.xz
cdo-f544af72e295d94c34831a08ea51ef8311825a1e.zip
[Releng] Remove all Dawn components that are not used by Papyrus
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateDawnGenModelEMFAction.java63
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateEMFFragmentAction.java88
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/creators/EMFFragmentCreator.java36
3 files changed, 0 insertions, 187 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateDawnGenModelEMFAction.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateDawnGenModelEMFAction.java
deleted file mode 100644
index d08940dc0f..0000000000
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateDawnGenModelEMFAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 2015 Eike Stepper (Berlin, Germany) 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:
- * Martin Fluegge - initial API and implementation
- */
-package org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui.actions;
-
-import org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenModelAction;
-import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawnFragmentGenerator;
-import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.dawnEmfGenmodel.DawnEMFGenerator;
-import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.dawnEmfGenmodel.DawnEmfGenmodelFactory;
-
-import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * @author Martin Fluegge
- */
-public class GenerateDawnGenModelEMFAction extends GenerateDawnGenModelAction
-{
- protected final String emfGenmodelFileExtension = "emf";
-
- @Override
- protected DawnFragmentGenerator getDawnFragmentGenerator(IFile genFile, ResourceSet resourceSet)
- {
- String genModelFile = genFile.getRawLocationURI().toString();
- DawnEMFGenerator dawnEMFGenerator = DawnEmfGenmodelFactory.eINSTANCE.createDawnEMFGenerator();
-
- URI emfGenModelResourceUri = URI.createURI(genModelFile);
- Resource emfGenModelResource = resourceSet.getResource(emfGenModelResourceUri, true);
-
- GenModel genModel = (GenModel)emfGenModelResource.getContents().get(0);
-
- dawnEMFGenerator.setDawnEditorClassName("Dawn" + genModel.getModelName() + "Editor");
- dawnEMFGenerator.setFragmentName(genModel.getEditorPluginID() + ".dawn");
- dawnEMFGenerator.setEmfGenModel(genModel);
- return dawnEMFGenerator;
- }
-
- @Override
- protected ResourceSet createResourceSet()
- {
- ResourceSet resourceSet = super.createResourceSet();
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("genmodel", new XMIResourceFactoryImpl());
- return resourceSet;
- }
-
- @Override
- protected Resource getDawnFragmentModelResource(String path, String modelname, ResourceSet resourceSet)
- {
- return getResource(path, modelname, resourceSet, dawngenmodelFileExtension + "_" + emfGenmodelFileExtension);
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateEMFFragmentAction.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateEMFFragmentAction.java
deleted file mode 100644
index 8a1a9a13ff..0000000000
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/actions/GenerateEMFFragmentAction.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 2015, 2016 Eike Stepper (Berlin, Germany) 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:
- * Martin Fluegge - initial API and implementation
- */
-package org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui.actions;
-
-import org.eclipse.emf.cdo.dawn.codegen.creators.Creator;
-import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui.creators.EMFFragmentCreator;
-import org.eclipse.emf.cdo.dawn.codegen.messages.Messages;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-/**
- * @author Martin Fluegge
- * @since 0.3
- */
-public class GenerateEMFFragmentAction implements IObjectActionDelegate
-{
- private IResource selectedElement;
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart)
- {
- }
-
- public void run(IAction action)
- {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- try
- {
- window.run(true, true, new IRunnableWithProgress()
- {
- @SuppressWarnings("deprecation")
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
- {
- monitor.beginTask(Messages.GenerateEMFFragmentAction_0, 1000);
- ArrayList<Creator> creators = new ArrayList<Creator>();
- creators.add(new EMFFragmentCreator(selectedElement));
-
- for (Creator creator : creators)
- {
- IProgressMonitor monitor2 = new org.eclipse.core.runtime.SubProgressMonitor(monitor, 1000 / creators.size());
- creator.create(monitor2);
- monitor2.done();
- }
- monitor.done();
- }
- });
- }
- catch (InvocationTargetException ex)
- {
- throw new RuntimeException(ex);
- }
- catch (InterruptedException ex)
- {
- throw new RuntimeException(ex);
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection)
- {
- if (selection instanceof IStructuredSelection)
- {
- Object sel = ((IStructuredSelection)selection).getFirstElement();
- if (sel instanceof IResource)
- {
- selectedElement = (IResource)sel;
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/creators/EMFFragmentCreator.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/creators/EMFFragmentCreator.java
deleted file mode 100644
index 3a21cc9816..0000000000
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui/src/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/emf/ui/creators/EMFFragmentCreator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) 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:
- * Martin Fluegge - initial API and implementation
- */
-package org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui.creators;
-
-import org.eclipse.emf.cdo.dawn.codegen.creators.impl.AbstractFragmentCreator;
-import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.util.DawnEMFWorkflowUtil;
-
-import org.eclipse.core.resources.IResource;
-
-import java.net.URL;
-
-/**
- * @author Martin Fluegge
- * @since 1.0
- */
-public class EMFFragmentCreator extends AbstractFragmentCreator
-{
- public EMFFragmentCreator(IResource selectedElement)
- {
- super(selectedElement);
- }
-
- @Override
- protected URL getWorkflowURL()
- {
- return new DawnEMFWorkflowUtil().getWorkFlow();
- }
-}

Back to the top