Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-07-11 09:33:27 +0000
committercletavernie2013-07-11 09:33:27 +0000
commitb6b8c52a119787308254c54d3e33c6c518879794 (patch)
tree60f4ea4b1baff10625fe1a7f947d318a01609cd0 /plugins
parentc35c95b368c4c5b6e2fb5ca0e446b6b010c342bb (diff)
downloadorg.eclipse.papyrus-b6b8c52a119787308254c54d3e33c6c518879794.tar.gz
org.eclipse.papyrus-b6b8c52a119787308254c54d3e33c6c518879794.tar.xz
org.eclipse.papyrus-b6b8c52a119787308254c54d3e33c6c518879794.zip
[SVN] Move the search plug-ins to their final location
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.classpath7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.project28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/META-INF/MANIFEST.MF20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/about.html28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/build.properties8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.properties2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.xml12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/Activator.java43
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/DiagramViewerSearcher.java72
10 files changed, 227 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.classpath
new file mode 100644
index 00000000000..da1049abda9
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.classpath
@@ -0,0 +1,7 @@
+<?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/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.project
new file mode 100644
index 00000000000..297212664ff
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.viewersearcher</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/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+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/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..39c6eee204d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.services.viewersearch;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.gmf.runtime.diagram.core;bundle-version="1.6.0",
+ org.eclipse.papyrus.views.search;bundle-version="0.10.1",
+ org.eclipse.search;bundle-version="3.8.100"
+Bundle-Vendor: %vendorName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.viewersearcher.Act
+ ivator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.viewersearcher;
+ singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/about.html
new file mode 100644
index 00000000000..5ddc72c177f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/about.html
@@ -0,0 +1,28 @@
+<!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 20, 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/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/build.properties
new file mode 100644
index 00000000000..653ec3c3daf
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.properties
new file mode 100644
index 00000000000..29dd7f00a22
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.properties
@@ -0,0 +1,2 @@
+pluginName=GMF Viewer Searcher (Incubation)
+vendorName=Eclipse Modeling Project \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.xml
new file mode 100644
index 00000000000..69fc64fec42
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.services.viewersearch.viewerSearcher">
+ <viewerSearcher
+ class="org.eclipse.papyrus.infra.gmfdiag.viewersearcher.DiagramViewerSearcher"
+ id="org.eclipse.papyrus.infra.services.gmfViewerSearcher.diagramViewerSearcher">
+ </viewerSearcher>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/Activator.java
new file mode 100644
index 00000000000..37ee424285c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/Activator.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.infra.gmfdiag.viewersearcher;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/DiagramViewerSearcher.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/DiagramViewerSearcher.java
new file mode 100644
index 00000000000..892c839a9c4
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/src/org/eclipse/papyrus/infra/gmfdiag/viewersearcher/DiagramViewerSearcher.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.infra.gmfdiag.viewersearcher;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.viewersearch.impl.AbstractViewerSearcher;
+
+/**
+ *
+ * Contributes to the viewersearchservice by providing the ability to search viewers in GMF diagrams
+ *
+ */
+public class DiagramViewerSearcher extends AbstractViewerSearcher {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.services.viewersearch.impl.AbstractViewerSearcher#getViewers(java.util.Collection, java.util.Collection)
+ *
+ * @param modelElements
+ * @param modelSets
+ * @return
+ */
+ @Override
+ public Map<Object, Map<Object, Object>> getViewers(Collection<Object> modelElements, Collection<ModelSet> modelSets) {
+
+ Map<Object, Map<Object, Object>> results = new HashMap<Object, Map<Object, Object>>();
+
+ for(ModelSet modelSet : modelSets) {
+
+ Map<EObject, Collection<Setting>> references = EcoreUtil.UsageCrossReferencer.findAll(modelElements, modelSet);
+
+ for(Object semanticElement : references.keySet()) {
+ for(Setting setting : references.get(semanticElement)) {
+ if(setting.getEObject() instanceof View) {
+ //Diagram diagram = ((View)setting.getEObject()).getDiagram();
+ Map<Object, Object> viewMappings;
+
+ if(results.containsKey(modelSet)) {
+ viewMappings = results.get(modelSet);
+ } else {
+ viewMappings = new HashMap<Object, Object>();
+ }
+ viewMappings.put(setting.getEObject(), semanticElement);
+
+ results.put(modelSet, viewMappings);
+ }
+ }
+ }
+ }
+
+ return results;
+ }
+}

Back to the top