Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortarendt2013-01-12 08:43:56 -0500
committertarendt2013-01-12 08:43:56 -0500
commit1459c99fb63f27b22642b46a74d28601495f1fb3 (patch)
tree1b9c952dfa3acbed36c777d67241e15a72de3618
parentc44a8f236cfc66d13452c6566f426d9d20026640 (diff)
downloadorg.eclipse.emf.refactor.refactoring-1459c99fb63f27b22642b46a74d28601495f1fb3.tar.gz
org.eclipse.emf.refactor.refactoring-1459c99fb63f27b22642b46a74d28601495f1fb3.tar.xz
org.eclipse.emf.refactor.refactoring-1459c99fb63f27b22642b46a74d28601495f1fb3.zip
ext point, interface and class added for button creation in refactoring
dialog
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.classbin0 -> 410 bytes
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.classbin0 -> 2734 bytes
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/plugin.xml3
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/schema/org.eclipse.emf.refactor.smellstatistics.exsd102
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.java14
-rw-r--r--org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.java42
7 files changed, 164 insertions, 1 deletions
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/META-INF/MANIFEST.MF b/org.eclipse.emf.refactor.refactoring.runtime/META-INF/MANIFEST.MF
index de428c8..2ea509c 100644
--- a/org.eclipse.emf.refactor.refactoring.runtime/META-INF/MANIFEST.MF
+++ b/org.eclipse.emf.refactor.refactoring.runtime/META-INF/MANIFEST.MF
@@ -26,5 +26,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.ui
Export-Package: org.eclipse.emf.refactor.refactoring.runtime,
org.eclipse.emf.refactor.refactoring.runtime.ltk,
+ org.eclipse.emf.refactor.refactoring.runtime.ltk.change,
org.eclipse.emf.refactor.refactoring.runtime.ltk.ui,
- org.eclipse.emf.refactor.refactoring.runtime.test
+ org.eclipse.emf.refactor.refactoring.runtime.test,
+ org.eclipse.emf.refactor.refactoring.runtime.ui
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.class b/org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.class
new file mode 100644
index 0000000..a6f718d
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.class b/org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.class
new file mode 100644
index 0000000..3a78f49
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactoring.runtime/bin/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/plugin.xml b/org.eclipse.emf.refactor.refactoring.runtime/plugin.xml
index 01af65f..d59b483 100644
--- a/org.eclipse.emf.refactor.refactoring.runtime/plugin.xml
+++ b/org.eclipse.emf.refactor.refactoring.runtime/plugin.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
+
+ <extension-point id="org.eclipse.emf.refactor.inputpagebutton" name="InputPageButton" schema="schema/org.eclipse.emf.refactor.smellstatistics.exsd"/>
+
<extension
point="org.eclipse.ui.menus">
<menuContribution
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/schema/org.eclipse.emf.refactor.smellstatistics.exsd b/org.eclipse.emf.refactor.refactoring.runtime/schema/org.eclipse.emf.refactor.smellstatistics.exsd
new file mode 100644
index 0000000..61d9af8
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactoring.runtime/schema/org.eclipse.emf.refactor.smellstatistics.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.emf.refactor" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.emf.refactor" id="inputpagebutton" name="org.eclipse.emf.refactor.inputpagebutton"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="inputpagebuttoncreator"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="inputpagebuttoncreator">
+ <complexType>
+ <attribute name="creatorclass" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.emf.refactor.refactoring.runtime.ui.IInputPageButtonCreator"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.java b/org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.java
new file mode 100644
index 0000000..4e98e5c
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/IInputPageButtonCreator.java
@@ -0,0 +1,14 @@
+package org.eclipse.emf.refactor.refactoring.runtime.ui;
+
+import org.eclipse.emf.refactor.refactoring.interfaces.IController;
+import org.eclipse.emf.refactor.refactoring.runtime.ltk.ui.AbstractRefactoringWizard;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+public interface IInputPageButtonCreator {
+
+ public Button createButton(
+ Composite parent,
+ IController refactoringControler,
+ AbstractRefactoringWizard wizard);
+}
diff --git a/org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.java b/org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.java
new file mode 100644
index 0000000..9987244
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactoring.runtime/src/org/eclipse/emf/refactor/refactoring/runtime/ui/InputPageButtonLoader.java
@@ -0,0 +1,42 @@
+package org.eclipse.emf.refactor.refactoring.runtime.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+
+public class InputPageButtonLoader {
+
+ private static final String EMF_REFACTOR_INPUT_PAGE_BUTTON = "org.eclipse.emf.refactor.inputpagebutton";
+ private static final Object INPUT_PAGE_BUTTON_CREATOR_TAG = "inputpagebuttoncreator";
+ private static final String CREATOR_CLASS_TAG = "creatorclass";
+ public static final InputPageButtonLoader iNSTANCE = new InputPageButtonLoader();
+ private List<IInputPageButtonCreator> inputPageButtonCreatorClasses;
+
+ private InputPageButtonLoader() {
+ this.inputPageButtonCreatorClasses = loadInputPageButtonCreatorClasses();
+ }
+
+ private List<IInputPageButtonCreator> loadInputPageButtonCreatorClasses() {
+ ArrayList<IInputPageButtonCreator> creatorClasses = new ArrayList<IInputPageButtonCreator>();
+ IConfigurationElement[] metricEntry = Platform.getExtensionRegistry()
+ .getConfigurationElementsFor(EMF_REFACTOR_INPUT_PAGE_BUTTON);
+
+ for (IConfigurationElement element : metricEntry) {
+ try {
+ if (element.getName().equals(INPUT_PAGE_BUTTON_CREATOR_TAG)) {
+ final IInputPageButtonCreator creatorClass = (IInputPageButtonCreator)element.createExecutableExtension(CREATOR_CLASS_TAG);
+ creatorClasses.add(creatorClass);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return creatorClasses;
+ }
+
+ public List<IInputPageButtonCreator> getInputPageButtonCreatorClasses() {
+ return inputPageButtonCreatorClasses;
+ }
+}

Back to the top