Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2017-03-03 10:15:43 +0000
committerBenoit Maggi2017-03-03 10:15:43 +0000
commit6adfa6c5368f18f28943db46486c892e276dd0cb (patch)
tree6c73a97228f120d16b33aa8482bc2a8058d20200 /extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace
parent7a7d87b75c174e9a38a710aab101d74dd8456e14 (diff)
downloadorg.eclipse.papyrus-6adfa6c5368f18f28943db46486c892e276dd0cb.tar.gz
org.eclipse.papyrus-6adfa6c5368f18f28943db46486c892e276dd0cb.tar.xz
org.eclipse.papyrus-6adfa6c5368f18f28943db46486c892e276dd0cb.zip
Bug 512962 - [Refactoring] Move refactoring to incubation repository
- remove all code related to refactoring - the code has been transferred to org.eclipse.papyrus.incubation Change-Id: I30ae106f0c610f08d408f2eee4e33bf7cf4a8008 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace')
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF19
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.pngbin36747 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml6
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html12
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki11
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.pngbin786 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties16
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml44
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml50
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java67
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java202
19 files changed, 0 insertions, 589 deletions
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath
deleted file mode 100644
index 098194ca4b7..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.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/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project
deleted file mode 100644
index f1a1f592967..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.refactoring.replace</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/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363afa..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF
deleted file mode 100644
index 8794cc69ebc..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.uml.refactoring.replace;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.refactoring.replace.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
- org.eclipse.core.runtime;bundle-version="3.11.0",
- org.eclipse.ltk.core.refactoring;bundle-version="3.6.200",
- org.eclipse.ltk.ui.refactoring;bundle-version="3.7.200",
- org.eclipse.papyrus.uml.search.ui;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.refactoring;bundle-version="0.0.1",
- org.eclipse.uml2.uml;bundle-version="5.1.0",
- org.eclipse.help;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: %vendorName
-Bundle-Localization: plugin
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/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>June 5, 2007</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>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties
deleted file mode 100644
index 2dfc6eae828..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- icons/,\
- about.html
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.png
deleted file mode 100644
index 7ebcbfc693b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml
deleted file mode 100644
index 26a1b8a5033..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="Replace" link_to="../org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml#refactoring_list" topic="doc/replace.html">
- <topic href="doc/replace.html" label="Replace">
- </topic>
-
-</toc>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html
deleted file mode 100644
index 6c2ce2758ea..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>
-<body>
- <h1 id="Replace">Replace</h1>
- <p>The replace refactoring permits to replace all occurrences of a string by another string.</p>
- <p>The following image illustrates the Replace refactoring dialog.</p><p><img border="0" src="images/replace.png"/></p>
- <ul>
- <li>In the A area the user indicates the string to be replaced and the new string which should replace the old.</li>
- <li>In the B area the user indicates if the refactoring should consider the case when it finds the old string. </li>
- <li>In the C area the user indicates if the wants to replace only name or all strings.</li>
- </ul>
-</body>
-</html> \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki
deleted file mode 100644
index 41f333f5ef5..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki
+++ /dev/null
@@ -1,11 +0,0 @@
-=Replace=
-
-The replace refactoring permits to replace all occurrences of a string by another string.
-
-The following image illustrates the Replace refactoring dialog.
-
-[[image:images/replace.png]]
-
-* In the A area the user indicates the string to be replaced and the new string which should replace the old.
-* In the B area the user indicates if the refactoring should consider the case when it finds the old string.
-* In the C area the user indicates if the wants to replace only name or all strings. \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.png
deleted file mode 100644
index 049da9f00bd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties
deleted file mode 100644
index 9e0e186c950..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2015 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:
-# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
-
-pluginName=Papyrus Refactoring Replace
-vendorName=Eclipse Modeling Project
-
-replaceContribution.label=Replace
-replaceContribution.tooltip=Replace the specified Strings in the model
-replaceCommand.name=ReplaceCommand \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml
deleted file mode 100644
index 1506692da9c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.refactoring.menu?after=additions">
- <command
- commandId="org.eclipse.papyrus.refactoring.replace.command"
- id="org.eclipse.papyrus.refactoring.replace.command"
- icon="icons/refactor.png"
- label="%replaceContribution.label"
- style="push"
- tooltip="%replaceContribution.tooltip">
- </command>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.refactoring.replace.command"
- name="%replaceCommand.name">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.refactoring.replace.handler.ReplaceHandler"
- commandId="org.eclipse.papyrus.refactoring.replace.command">
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="doc/replace-toc.xml"
- primary="false">
- </toc>
- </extension>
-
-</plugin>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml
deleted file mode 100644
index 3ef2532bde4..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.papyrus.uml.refactoring.replace</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <groupId>org.eclipse.papyrus</groupId>
- <packaging>eclipse-plugin</packaging>
- <parent>
- <relativePath>../../../releng/extra</relativePath>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
- <version>${mylyn.wikitext.version}</version>
- <configuration>
- <sourceFolder>doc</sourceFolder>
- <outputFolder>${project.build.directory}/site/generated-eclipse-help</outputFolder>
- <multipleOutputFiles>false</multipleOutputFiles>
- <navigationImages>true</navigationImages>
- <formatOutput>true</formatOutput>
- <htmlFilenameFormat>$1.html</htmlFilenameFormat>
- <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
- <helpPrefix>target/site/generated-eclipse-help</helpPrefix>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>eclipse-help</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.mediawiki.core</artifactId>
- <version>${mylyn.wikitext.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java
deleted file mode 100644
index b87cce6e1a1..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace;
-
-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.refactoring.replace"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- 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/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java
deleted file mode 100644
index 7db4300bb3f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.papyrus.refactoring.core.PapyrusRefactoringOperation;
-import org.eclipse.papyrus.uml.refactoring.replace.ui.ReplaceRefactoring;
-
-/**
- * Replace handler linked to the dropdown menu
- *
- */
-public class ReplaceHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ReplaceRefactoring replaceRefactoring = new ReplaceRefactoring();
- PapyrusRefactoringOperation operation = new PapyrusRefactoringOperation(replaceRefactoring);
- operation.run();
- return null;
- }
-
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java
deleted file mode 100644
index 77fa1c877de..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.refactoring.replace.messages.messages"; //$NON-NLS-1$
-
- public static String REPLACEREFACTORING_PAGELABEL;
- public static String REPLACEREFACTORING_INITALTEXT;
- public static String REPLACEREFACTORING_NEWTEXT;
- public static String REPLACEREFACTORING_INITIALTEXT_LABEL;
- public static String REPLACEREFACTORING_CASE;
- public static String REPLACEREFACTORING_NEWTEXT_LABEL;
- public static String REPLACEREFACTORING_NAMESCOPE;
- public static String REPLACEREFACTORING_MODELSCOPE;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties
deleted file mode 100644
index b6d630c642f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-REPLACEREFACTORING_PAGELABEL=Replace
-REPLACEREFACTORING_INITALTEXT=Please indicate the original value which should be replaced.
-REPLACEREFACTORING_NEWTEXT=Please indicate the new value which should replace the original.
-REPLACEREFACTORING_INITIALTEXT_LABEL=&Replace:
-REPLACEREFACTORING_CASE=Case sensitive
-REPLACEREFACTORING_NEWTEXT_LABEL=&With:
-REPLACEREFACTORING_NAMESCOPE=&Replace only name
-REPLACEREFACTORING_MODELSCOPE=&Replace all strings
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java
deleted file mode 100644
index 7f4e8fd550b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace.ui;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.refactoring.helper.AbstractChoiceOnUIParticipantsTransformation;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.ITransformationOnElement;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.ReplaceTransformationOnElement;
-import org.eclipse.papyrus.uml.refactoring.replace.messages.Messages;
-import org.eclipse.papyrus.uml.search.ui.query.PapyrusQuery;
-import org.eclipse.papyrus.views.search.scope.ScopeEntry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * Refactoring Participant defining the Replace dialog and specifying the methods to call for a replace action
- *
- */
-public class ReplaceRefactoring extends AbstractChoiceOnUIParticipantsTransformation {
-
- /** The field where the user indicates the new string. */
- private Text fNewValueText;
-
- /** The field where the user indicates the string to replace. */
- private Text fOldValueText;
-
- /** A button to know if the string indicated by the user is case sensitive. */
- private Button fBtnCaseSensitive;
-
- /** A button to indicate if we have to replace all strings. */
- private Button fReplaceAllStringAttributes;
-
- /** A button to indicate if we have to replace only the name. */
- private Button fReplaceNameAttribute;
-
-
- /**
- * Constructor.
- *
- */
- public ReplaceRefactoring() {
- super(Messages.REPLACEREFACTORING_PAGELABEL);
- // super(Messages.ReplaceRefactoring_8);
- }
-
- /**
- * Create a {@link Text} in a composite.
- *
- * @param result
- * The composite where we have to create the {@link Text}.
- * @return
- * The {@link Text} created.
- */
- private Text createNameField(Composite result) {
- Text field = new Text(result, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
- field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return field;
- }
-
-
-
- @Override
- public RefactoringStatus checkFinalConditions() {
- RefactoringStatus status = new RefactoringStatus();
- if (fOldValueText.getText().isEmpty()) {
- status.merge(RefactoringStatus.createFatalErrorStatus(Messages.REPLACEREFACTORING_INITALTEXT));
- } else if (fNewValueText.getText().isEmpty()) {
- status.merge(RefactoringStatus.createFatalErrorStatus(Messages.REPLACEREFACTORING_NEWTEXT));
-
- }
- return status;
- }
-
-
- @Override
- public void createContent(Composite parent) {
-
- GridLayout layout = new GridLayout();
-
- Composite composite = new Composite(parent, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 3;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
- Label label = new Label(composite, SWT.NONE);
- label.setText(Messages.REPLACEREFACTORING_INITIALTEXT_LABEL);
- fOldValueText = createNameField(composite);
- fOldValueText.setFocus();
-
- fBtnCaseSensitive = new Button(composite, SWT.CHECK);
- fBtnCaseSensitive.setText(Messages.REPLACEREFACTORING_CASE);
-
- label = new Label(composite, SWT.NONE);
- label.setText(Messages.REPLACEREFACTORING_NEWTEXT_LABEL);
-
- fNewValueText = createNameField(composite);
-
- GridData data = new GridData();
- data.horizontalAlignment = SWT.END;
-
-
- fReplaceNameAttribute = new Button(parent, SWT.RADIO);
- fReplaceNameAttribute.setText(Messages.REPLACEREFACTORING_NAMESCOPE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- data.verticalIndent = 15;
- fReplaceNameAttribute.setLayoutData(data);
- fReplaceNameAttribute.setSelection(true);
-
- fReplaceAllStringAttributes = new Button(parent, SWT.RADIO);
- fReplaceAllStringAttributes.setText(Messages.REPLACEREFACTORING_MODELSCOPE);
- GridData data2 = new GridData(GridData.FILL_HORIZONTAL);
-
-
- data2.horizontalSpan = 3;
- fReplaceAllStringAttributes.setLayoutData(data2);
-
- }
-
-
- @Override
- public ITransformationOnElement getTransformationOnElement() {
-
- Collection<ScopeEntry> scpEntry = new ArrayList<>();
- scpEntry.add(createScopeEntry());
- PapyrusQuery query = new PapyrusQuery(fOldValueText.getText(), fBtnCaseSensitive.getSelection(), false, scpEntry, getMetaClassesList(), fReplaceAllStringAttributes.getSelection());
- query.run(new NullProgressMonitor());
- return new ReplaceTransformationOnElement(query.getResults(), query, fNewValueText.getText());
- }
-
- /**
- * Retrieves all the metaclasses of the UMLPackage in order to parse the model during the search query
- *
- * @return
- * The list containing the metaclasses
- */
- private Object[] getMetaClassesList() {
- Set<EClassifier> umlMetaClasses = new HashSet<>();
- for (EClassifier eClassifier : UMLPackage.eINSTANCE.getEClassifiers()) {
- if (eClassifier instanceof EClass) {
- umlMetaClasses.add(eClassifier);
- }
- }
- return umlMetaClasses.toArray();
- }
-
- /**
- * Sets the entry, i.e. the scope of the query, as the selected element's model
- *
- * @return
- */
- private ScopeEntry createScopeEntry() {
- // Resource diResource = DiModelUtils.getDiResource(fModelSet);
- Resource diResource = ((DiModel) fModelSet.getModel(DiModel.DI_MODEL_ID)).getResource();
- return new ScopeEntry(diResource.getURI());
- }
-
-
- @Override
- public String getName() {
- return Messages.REPLACEREFACTORING_PAGELABEL;
- }
-
- @Override
- public void performHelp() {
- // TODO Write the help
- // http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_help_contexts.html
- PlatformUI.getWorkbench().getHelpSystem().displayHelp("help context id");
- }
-
-}
-
-

Back to the top