summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 10:20:44 (EDT)
committerLaurent Wouters2014-04-04 10:20:44 (EDT)
commited290599164a90e68463719ab8ab1eef2ac20f3e (patch)
treefdb8a1d592099d36c1ba9d81d4015c52ba35fe53
parent20daf11a6d2768c4769e9bd9a8cd6d9537758ba3 (diff)
downloadorg.eclipse.papyrus-ed290599164a90e68463719ab8ab1eef2ac20f3e.zip
org.eclipse.papyrus-ed290599164a90e68463719ab8ab1eef2ac20f3e.tar.gz
org.eclipse.papyrus-ed290599164a90e68463719ab8ab1eef2ac20f3e.tar.bz2
[clean] Retiring org.eclipse.papyrus.compare.report.uilast/org.eclipse.papyrus.compare.report.ui
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.classpath7
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.project28
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/META-INF/MANIFEST.MF26
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/OSGI-INF/l10n/bundle.properties5
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/about.html28
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/build.properties10
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/icons/export_as_html.gifbin561 -> 0 bytes
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/plugin.xml32
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/Activator.java66
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsGenReportAction.java53
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsHTMLWizard.java178
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/common/GenerateAll.java93
-rw-r--r--deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/popupMenus/AcceleoGenerateGenerateReportAction.java112
14 files changed, 0 insertions, 644 deletions
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.classpath b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.classpath
deleted file mode 100644
index 2d1a430..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.project b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.project
deleted file mode 100644
index 4646b49..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.compare.report.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.settings/org.eclipse.jdt.core.prefs b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0b515fe..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-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/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/META-INF/MANIFEST.MF b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index f12b0ae..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui.ide,
- org.eclipse.papyrus.compare.report;bundle-version="0.10.0",
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.compare.diff,
- org.eclipse.emf.compare.ui,
- org.eclipse.ocl,
- org.eclipse.ocl.ecore,
- org.eclipse.acceleo.model,
- org.eclipse.acceleo.engine
-Export-Package: org.eclipse.papyrus.compare.report.ui.common
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Version: 0.10.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.compare.report.ui.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.compare.report.ui;singleton:=
- true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/OSGI-INF/l10n/bundle.properties b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index aafbd3c..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-#Properties file for org.eclipse.papyrus.compare.report.ui
-menu.label = Acceleo Model to Text
-action.label = Generate DiffReport
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = Acceleo GenerateReport Module IDE Plug-in (Incubation) \ No newline at end of file
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/about.html b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/about.html
deleted file mode 100644
index 2091030..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>November 14, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) 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 <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/build.properties b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/build.properties
deleted file mode 100644
index d9ef689..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- about.html,\
- OSGI-INF/
-src.includes = about.html
-
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/icons/export_as_html.gif b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/icons/export_as_html.gif
deleted file mode 100644
index 8a31f45..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/icons/export_as_html.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/plugin.xml b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/plugin.xml
deleted file mode 100644
index b1b7e79..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- adaptable="true"
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.emfdiff"
- id="org.eclipse.papyrus.compare.report.ui.popupMenus.contribution.IFile">
- <menu id="org.eclipse.acceleo.module.menu" label="%menu.label" path="additionsAcceleo">
- <groupMarker name="acceleo"/>
- </menu>
- <action
- class="org.eclipse.papyrus.compare.report.ui.popupMenus.AcceleoGenerateGenerateReportAction"
- enablesFor="+"
- id="org.eclipse.papyrus.compare.report.ui.popupMenus.acceleoGenerateGenerateReportAction"
- icon="icons/export_as_html.gif"
- label="%action.label"
- menubarPath="org.eclipse.acceleo.module.menu/acceleo"/>
- </objectContribution>
- </extension>
-
- <extension
- point="org.eclipse.emf.compare.ui.export">
- <action
- class="org.eclipse.papyrus.compare.report.ui.action.ExportAsGenReportAction"
- fileExtension="uml"
- id="org.eclipse.papyrus.compare.exportAsHTMLAction">
- </action>
- </extension>
-
-</plugin>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/Activator.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/Activator.java
deleted file mode 100644
index 9c9b26f..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/Activator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.compare.report.ui;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- */
-public class Activator extends AbstractUIPlugin {
-
- /**
- * The plug-in ID.
- */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.compare.report.ui";
-
- /**
- * The shared instance.
- */
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- }
-
- /**{@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- * @generated
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /**{@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- * @generated
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsGenReportAction.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsGenReportAction.java
deleted file mode 100644
index 806c0f5..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsGenReportAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.papyrus.compare.report.ui.action;
-
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.ui.export.IExportAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.compare.report.ui.Activator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-public class ExportAsGenReportAction implements IExportAction {
-
- private final String myText = "As HTML Report";
-
- private final String myToolTipText = "Export Diff Report in HTML format";
-
- private final String myImagePath = "icons/export_as_html.gif";
-
- private final Image myImage;
-
- public ExportAsGenReportAction() {
- myImage = AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, myImagePath).createImage();
- }
-
- public String getText() {
- return myText;
- }
-
- public String getToolTipText() {
- return myToolTipText;
- }
-
- public void exportSnapshot(ComparisonSnapshot snapshot) {
- final ExportAsHTMLWizard wizard = new ExportAsHTMLWizard();
- final IWorkbench workbench = PlatformUI.getWorkbench();
-
- wizard.init(workbench, snapshot);
- final WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
- dialog.open();
-
- }
-
- public Image getDisabledImage() {
- return myImage;
- }
-
- public Image getEnabledImage() {
- return myImage;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsHTMLWizard.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsHTMLWizard.java
deleted file mode 100644
index a223b3c..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/action/ExportAsHTMLWizard.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.eclipse.papyrus.compare.report.ui.action;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.ui.internal.wizard.SaveDeltaWizard;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.compare.report.services.UmlElementService;
-import org.eclipse.papyrus.compare.report.ui.common.GenerateAll;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-
-public class ExportAsHTMLWizard extends SaveDeltaWizard {
-
- private static final String HTML_EXTENSION = "html";
-
- private static final String EMFDIFF_EXTENSION = "emfdiff";
-
- private WizardNewFileCreationPage myNewReportFileCreationPage;
-
- private IResource myFirstSelectedFile;
-
- private String myDefaultFileName;
-
- public ExportAsHTMLWizard() {
- super(null); // use default extension
- }
-
-
- public void init(IWorkbench workbench, ComparisonSnapshot inputSnapshot) {
- super.init(workbench, inputSnapshot);
- DiffModel model = getDiffModel(inputSnapshot);
- Resource firstSelectedResource = getFirstSelectedResource(model);
- myFirstSelectedFile = ResourcesPlugin.getWorkspace().getRoot().findMember(firstSelectedResource.getURI().toPlatformString(true));
- myDefaultFileName = new UmlElementService().getFileName(model);
- }
-
- private DiffModel getDiffModel(ComparisonSnapshot inputSnapshot) {
- if(inputSnapshot instanceof ComparisonResourceSnapshot) {
- return ((ComparisonResourceSnapshot)inputSnapshot).getDiff();
- } else {
- EList<DiffModel> diffModels = ((ComparisonResourceSetSnapshot)inputSnapshot).getDiffResourceSet().getDiffModels();
- if(!diffModels.isEmpty()) {
- return diffModels.get(0);
- } else {
- // log;
- return null;
- }
- }
- }
-
- private Resource getFirstSelectedResource(DiffModel diffModel) {
- EList<EObject> leftRoots = diffModel.getLeftRoots();
- if(leftRoots.isEmpty()) {
- // log
- return null;
- }
- return leftRoots.get(0).eResource();
- }
-
- @Override
- public IStructuredSelection getSelection() {
- IStructuredSelection result = super.getSelection();
- if(result == null || result.isEmpty() && myFirstSelectedFile != null) {
- return new StructuredSelection(myFirstSelectedFile);
- }
- return result;
- }
-
- public void addPages() {
- super.addPages();
- findNewDiffFilePage().setAllowExistingResources(true);
- findNewDiffFilePage().setFileExtension(EMFDIFF_EXTENSION);
- findNewDiffFilePage().setFileName(getDefaultFileName() + "." + EMFDIFF_EXTENSION);
-
- myNewReportFileCreationPage = new WizardNewFileCreationPage("newFilePage1", getSelection());//$NON-NLS-1$
- myNewReportFileCreationPage.setFileName(getDefaultFileName() + "." + HTML_EXTENSION);
- myNewReportFileCreationPage.setAllowExistingResources(true);
- myNewReportFileCreationPage.setTitle("New HTML File");
- myNewReportFileCreationPage.setDescription("Create a new HTML file");
- myNewReportFileCreationPage.setFileExtension(HTML_EXTENSION);
- addPage(myNewReportFileCreationPage);
- }
-
- @Override
- public boolean performFinish() {
- boolean result = super.performFinish();
- if(!result) {
- return false;
- }
-
- myNewReportFileCreationPage.createNewFile();
-
- IProgressMonitor monitor = new NullProgressMonitor();
- IResource targetFolder = getTargetFolder(); // The logical folder were the IFile is to appear.
- File rawTargetFolder = getRawTargetFolder(); // The file-system folder were the File is to be created.
- GenerateAll generator = new GenerateAll(getNewDiffModelURI(), rawTargetFolder, getTemplateArguments());
-
- try {
- generator.doGenerate(monitor);
- } catch (IOException e) {
- e.printStackTrace();
- return false;
- } finally {
- try {
- targetFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- return true;
- }
-
- private String getDefaultFileName() {
- return myDefaultFileName;
- }
-
- private List<? extends Object> getTemplateArguments() {
- return Collections.singletonList(myNewReportFileCreationPage.getFileName());
- }
-
- private File getRawTargetFolder() {
- File targetFolder = null;
- IResource targetFolderResource = ResourcesPlugin.getWorkspace().getRoot().findMember(myNewReportFileCreationPage.getContainerFullPath());
- if (targetFolderResource.isLinked()) {
- targetFolder = targetFolderResource.getRawLocation().toFile();
- } else {
- IPath targetFolderPath = targetFolderResource.getLocation();
- if (targetFolderPath != null) {
- targetFolder = targetFolderPath.toFile();
- } else {
- // Virtual folder or non-local project.
- // In that case, use the diff-model's folder as file-system folder.
- WizardNewFileCreationPage saveDiffPage = findNewDiffFilePage();
- IPath filePath = saveDiffPage.getContainerFullPath().append(saveDiffPage.getFileName());
- IFile fileHandle = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- targetFolder = fileHandle.getRawLocation().toFile().getParentFile();
- }
- }
- return targetFolder;
- }
-
- private IResource getTargetFolder() {
- return ResourcesPlugin.getWorkspace().getRoot().findMember(myNewReportFileCreationPage.getContainerFullPath());
- }
-
- private WizardNewFileCreationPage findNewDiffFilePage() {
- final String page = "newFilePage1"; //$NON-NLS-1$
- return (WizardNewFileCreationPage)getPage(page);
- }
-
- private URI getNewDiffModelURI() {
- WizardNewFileCreationPage saveDiffPage = findNewDiffFilePage();
- IPath filePath = saveDiffPage.getContainerFullPath().append(saveDiffPage.getFileName());
- IFile fileHandle = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- return URI.createFileURI(fileHandle.getLocation().toOSString());
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/common/GenerateAll.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/common/GenerateAll.java
deleted file mode 100644
index b72d221..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/common/GenerateAll.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.compare.report.ui.common;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.BasicMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-
-
-/**
- * Main entry point of the 'GenerateReport' generation module.
- */
-public class GenerateAll {
-
- /**
- * The model URI.
- */
- private URI modelURI;
-
- private EObject model;
-
- /**
- * The output folder.
- */
- private File targetFolder;
-
- /**
- * The other arguments.
- */
- List<? extends Object> arguments;
-
- /**
- * Constructor.
- *
- * @param modelURI
- * is the URI of the model.
- * @param targetFolder
- * is the output folder
- * @param arguments
- * are the other arguments
- * @throws IOException
- * Thrown when the output cannot be saved.
- * @generated
- */
- public GenerateAll(URI modelURI, File targetFolder, List<? extends Object> arguments) {
- this.modelURI = modelURI;
- this.targetFolder = targetFolder;
- this.arguments = arguments;
- }
-
- public GenerateAll(EObject model, File targetFolder, List<? extends Object> arguments) {
- this.model = model;
- this.targetFolder = targetFolder;
- this.arguments = arguments;
- }
- /**
- * Launches the generation.
- *
- * @param monitor
- * This will be used to display progress information to the user.
- * @throws IOException
- * Thrown when the output cannot be saved.
- * @generated
- */
- public void doGenerate(IProgressMonitor monitor) throws IOException {
- if (!targetFolder.exists()) {
- targetFolder.mkdirs();
- }
-
- org.eclipse.papyrus.compare.report.files.GenerateReport gen0;
- if (modelURI != null) {
- gen0 = new org.eclipse.papyrus.compare.report.files.GenerateReport(modelURI, targetFolder, arguments);
- } else {
- gen0 = new org.eclipse.papyrus.compare.report.files.GenerateReport(model, targetFolder, arguments);
- }
- gen0.doGenerate(BasicMonitor.toMonitor(monitor));
-
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/popupMenus/AcceleoGenerateGenerateReportAction.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/popupMenus/AcceleoGenerateGenerateReportAction.java
deleted file mode 100644
index 04555f6..0000000
--- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.compare.report.ui/src/org/eclipse/papyrus/compare/report/ui/popupMenus/AcceleoGenerateGenerateReportAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.compare.report.ui.popupMenus;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.URI;
-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.papyrus.compare.report.ui.Activator;
-import org.eclipse.papyrus.compare.report.ui.common.GenerateAll;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionDelegate;
-
-/**
- * GenerateReport code generation.
- */
-public class AcceleoGenerateGenerateReportAction extends ActionDelegate implements IActionDelegate {
-
- /**
- * Selected model files.
- */
- protected List<IFile> files;
-
- /**{@inheritDoc}
- *
- * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- * @generated
- */
- @SuppressWarnings("unchecked")
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- files = ((IStructuredSelection) selection).toList();
- }
- }
-
- /**{@inheritDoc}
- *
- * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction)
- * @generated
- */
- public void run(IAction action) {
- if (files != null) {
- IRunnableWithProgress operation = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- try {
- Iterator<IFile> filesIt = files.iterator();
- while (filesIt.hasNext()) {
- IFile model = (IFile)filesIt.next();
- URI modelURI = URI.createPlatformResourceURI(model.getFullPath().toString(), true);
- try {
- IContainer target = model.getProject().getFolder("reports");
- GenerateAll generator = new GenerateAll(modelURI, target.getLocation().toFile(), getArguments());
- generator.doGenerate(monitor);
- } catch (IOException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- Activator.getDefault().getLog().log(status);
- } finally {
- model.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
- }
- }
- } catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- Activator.getDefault().getLog().log(status);
- }
- }
- };
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, operation);
- } catch (InvocationTargetException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- Activator.getDefault().getLog().log(status);
- } catch (InterruptedException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- Activator.getDefault().getLog().log(status);
- }
- }
- }
-
- /**
- * Computes the arguments of the generator.
- *
- * @return the arguments
- * @generated
- */
- protected List<? extends Object> getArguments() {
- return new ArrayList<String>();
- }
-
-} \ No newline at end of file