Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2011-09-12 09:36:01 +0000
committerMarkus Tiede2011-09-12 09:36:01 +0000
commiteb5d4d9f17da86fdd91555739303cfdee93fa82c (patch)
treec56127c302a983d4bdc19bb5e45de034cd5ef047
parentc73ce49504e83efba59a897604517dbc21b23a47 (diff)
downloadorg.eclipse.jubula.core-eb5d4d9f17da86fdd91555739303cfdee93fa82c.tar.gz
org.eclipse.jubula.core-eb5d4d9f17da86fdd91555739303cfdee93fa82c.tar.xz
org.eclipse.jubula.core-eb5d4d9f17da86fdd91555739303cfdee93fa82c.zip
Fix for issue 339506.
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.classpath7
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.gitignore2
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.project28
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/META-INF/MANIFEST.MF14
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/build.properties6
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/plugin.xml15
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/Activator.java60
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/GateEditPartIdentifier.java80
-rw-r--r--org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/LogicEditPartIdentifierAdapterFactory.java39
-rw-r--r--org.eclipse.jubula.examples/buildScript.xml10
-rw-r--r--org.eclipse.jubula.examples/resources/development/gef/com.bredexsw.guidancer.examples.logic.identifier.zipbin7873 -> 0 bytes
11 files changed, 257 insertions, 4 deletions
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.classpath b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.classpath
new file mode 100644
index 000000000..1fa3e6803
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.gitignore b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.gitignore
new file mode 100644
index 000000000..348c102af
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.gitignore
@@ -0,0 +1,2 @@
+/build
+/bin
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.project b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.project
new file mode 100644
index 000000000..38aecb145
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier</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/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/META-INF/MANIFEST.MF b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..278ff4d6a
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Remote Control - RCP: GEF Logic Example Identifier Plug-in
+Bundle-SymbolicName: org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier;singleton:=true
+Bundle-Version: 1.1.0
+Bundle-Activator: org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.gef,
+ org.eclipse.gef.examples.logic,
+ org.eclipse.jubula.rc.rcp
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse Jubula
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/build.properties b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/build.properties
new file mode 100644
index 000000000..dc80dfb73
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
+source.. = src/
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/plugin.xml b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/plugin.xml
new file mode 100644
index 000000000..d1ba91f39
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.gef.examples.logicdesigner.edit.GateEditPart"
+ class="org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier.LogicEditPartIdentifierAdapterFactory">
+ <adapter
+ type="org.eclipse.jubula.rc.rcp.gef.identifier.IEditPartIdentifier">
+ </adapter>
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/Activator.java b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/Activator.java
new file mode 100644
index 000000000..407f18962
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/Activator.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2011 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.gef.examples.logic.identifier"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ // empty
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/GateEditPartIdentifier.java b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/GateEditPartIdentifier.java
new file mode 100644
index 000000000..71e830bcf
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/GateEditPartIdentifier.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2011 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.examples.logicdesigner.edit.GateEditPart;
+import org.eclipse.gef.examples.logicdesigner.figures.GateFigure;
+import org.eclipse.gef.examples.logicdesigner.model.Gate;
+import org.eclipse.jubula.rc.rcp.gef.identifier.ClassCountEditPartIdentifier;
+import org.eclipse.jubula.rc.rcp.gef.identifier.IEditPartIdentifier;
+
+
+/**
+ * Identifier for Gate Edit Parts.
+ *
+ * @author BREDEX GmbH
+ * @created Jun 18, 2009
+ */
+public class GateEditPartIdentifier implements IEditPartIdentifier {
+
+ /** the Edit Part for which identifying information will be provided */
+ private GateEditPart m_editPart;
+
+ /** delegate for providing the identifier string */
+ private ClassCountEditPartIdentifier m_delegate;
+
+ /**
+ * Constructor
+ *
+ * @param editPart The Edit Part for which identifying information will be provided.
+ */
+ public GateEditPartIdentifier(GateEditPart editPart) {
+ m_editPart = editPart;
+ m_delegate = new ClassCountEditPartIdentifier(editPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Map<String, ConnectionAnchor> getConnectionAnchors() {
+ Map<String, ConnectionAnchor> anchorMap =
+ new HashMap<String, ConnectionAnchor>();
+
+ IFigure figure = m_editPart.getFigure();
+ if (figure instanceof GateFigure) {
+ GateFigure gateFigure = (GateFigure)figure;
+
+ String [] terminals =
+ new String [] {Gate.TERMINAL_A, Gate.TERMINAL_B};
+
+ for (int i = 0; i < terminals.length; i++) {
+ anchorMap.put(terminals[i],
+ gateFigure.getConnectionAnchor(terminals[i]));
+ }
+
+ }
+
+ return anchorMap;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getIdentifier() {
+ return m_delegate.getIdentifier();
+ }
+
+}
diff --git a/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/LogicEditPartIdentifierAdapterFactory.java b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/LogicEditPartIdentifierAdapterFactory.java
new file mode 100644
index 000000000..43d68ef7a
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier/src/org/eclipse/jubula/examples/extension/rcp/gef/logic/identifier/LogicEditPartIdentifierAdapterFactory.java
@@ -0,0 +1,39 @@
+package org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.gef.examples.logicdesigner.edit.GateEditPart;
+import org.eclipse.jubula.rc.rcp.gef.identifier.IEditPartIdentifier;
+
+
+/**
+ * Provides identifiers for Edit Parts in the Logic application.
+ *
+ * @author BREDEX GmbH
+ */
+public class LogicEditPartIdentifierAdapterFactory implements IAdapterFactory {
+
+ /** classes for which this factory provides adapters */
+ private static final Class [] ADAPTABLE_TYPES = new Class [] {
+ GateEditPart.class};
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adapterType == IEditPartIdentifier.class) {
+ if (adaptableObject instanceof GateEditPart) {
+ return new GateEditPartIdentifier(
+ (GateEditPart)adaptableObject);
+ }
+
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Class[] getAdapterList() {
+ return ADAPTABLE_TYPES;
+ }
+}
diff --git a/org.eclipse.jubula.examples/buildScript.xml b/org.eclipse.jubula.examples/buildScript.xml
index fb26261db..dcb193ce5 100644
--- a/org.eclipse.jubula.examples/buildScript.xml
+++ b/org.eclipse.jubula.examples/buildScript.xml
@@ -27,6 +27,7 @@
<property name="ExampleSwingExtensionServer" value="org.eclipse.jubula.examples.extension.swing.rc"/>
<property name="ExampleSwingExtensionAUT" value="org.eclipse.jubula.examples.extension.swing.aut"/>
+ <property name="ExampleGEFIdentifierExample" value="org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier"/>
<target name="build" depends="clean,
createDirStructure,
@@ -173,11 +174,12 @@
</target>
<target name="releaseDevelopment" depends="releaseExampleSwingExtensionAUT, releaseExampleSwingServerExtension">
- <copy todir="${examples.development.dir}">
- <fileset dir="resources/development"/>
- </copy>
- <mkdir dir="${examples.development.dir}/extension"/>
+ <mkdir dir="${examples.development.dir}"/>
+ <zip destfile="resources/development/${ExampleGEFIdentifierExample}.zip">
+ <zipfileset dir="../${ExampleGEFIdentifierExample}" prefix="${ExampleGEFIdentifierExample}"/>
+ </zip>
+ <mkdir dir="${examples.development.dir}/extension"/>
<property name="extensionSourceDir" value="${examples.development.dir}/extension/src"/>
<mkdir dir="${extensionSourceDir}"/>
<zip destfile="${extensionSourceDir}/eclipseProjects_ExampleSwingClientExtension.zip">
diff --git a/org.eclipse.jubula.examples/resources/development/gef/com.bredexsw.guidancer.examples.logic.identifier.zip b/org.eclipse.jubula.examples/resources/development/gef/com.bredexsw.guidancer.examples.logic.identifier.zip
deleted file mode 100644
index 07219f610..000000000
--- a/org.eclipse.jubula.examples/resources/development/gef/com.bredexsw.guidancer.examples.logic.identifier.zip
+++ /dev/null
Binary files differ

Back to the top