Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-12-22 06:02:45 -0500
committercletavernie2011-12-22 06:02:45 -0500
commit6ce551d55b4d9130637cda68975518db2075ee3c (patch)
tree7df57cb7b217c78ae6a305fe23d8bd1549fb3594 /extraplugins
parentc3c8d37de05f6cd61dd884f4c9a9334a752ab4f6 (diff)
downloadorg.eclipse.papyrus-6ce551d55b4d9130637cda68975518db2075ee3c.tar.gz
org.eclipse.papyrus-6ce551d55b4d9130637cda68975518db2075ee3c.tar.xz
org.eclipse.papyrus-6ce551d55b4d9130637cda68975518db2075ee3c.zip
Remove deprecated plug-in
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.classpath7
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.project28
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/about.html28
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/build.properties7
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.properties12
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.xml16
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/Activator.java95
-rw-r--r--extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/providers/EMFObjectLabelProvider.java160
9 files changed, 369 insertions, 0 deletions
diff --git a/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.classpath b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.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/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.project b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.project
new file mode 100644
index 00000000000..657890eb11c
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.views.properties.tabbedproperties.core</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/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/META-INF/MANIFEST.MF b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..9a75a9a211d
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.4.0",
+ org.eclipse.papyrus.infra.core;bundle-version="0.9.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0"
+Export-Package: org.eclipse.papyrus.views.properties.tabbedproperties.core,
+ org.eclipse.papyrus.views.properties.tabbedproperties.core.providers
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.views.properties.tabbedproperties.core.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.views.properties.tabbedproperties.core;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/about.html b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/about.html
new file mode 100644
index 00000000000..209103075a7
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/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 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/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/build.properties b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/build.properties
new file mode 100644
index 00000000000..282fed47ea1
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/build.properties
@@ -0,0 +1,7 @@
+#
+#Mon Sep 12 09:30:18 CEST 2011
+bin.includes=META-INF/,.,plugin.properties,about.html,plugin.xml,build.properties
+output..=bin/
+src.includes=about.html,META-INF/,.,plugin.properties,plugin.xml,build.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.properties b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.properties
new file mode 100644
index 00000000000..26bfbb06fd2
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 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:
+# Remi Schnekenburger - CEA LIST (remi.schnekenburger@cea.fr) - Initial API and implementation
+##################################################################################
+pluginName=Papyrus Core Tabbed Properties (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.xml b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.xml
new file mode 100644
index 00000000000..5e4319bc4fe
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/plugin.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs contributorId="TreeOutlinePage">
+ <propertyTab id="Base" label="General" category="org.eclipse.papyrus" afterTab=""/>
+ <propertyTab id="org.eclipse.papyrus.tabbedproperties.profile" label="Profile" category="org.eclipse.papyrus" afterTab="Base" />
+ <propertyTab id="Comments" label="Comments" category="org.eclipse.papyrus" afterTab="org.eclipse.papyrus.tabbedproperties.profile"/>
+ <propertyTab id="org.eclipse.papyrus.tabbedproperties.appearance.appearancetab" label="Appearance" category="org.eclipse.papyrus" afterTab="Comments"/>
+ <propertyTab id="advanced" label="Advanced" category="org.eclipse.papyrus" afterTab="org.eclipse.papyrus.tabbedproperties.appearance.appearancetab"/>
+ </propertyTabs>
+ </extension>
+
+
+</plugin>
diff --git a/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/Activator.java b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/Activator.java
new file mode 100644
index 00000000000..c8480cc2c99
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/Activator.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2009 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:
+ * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.tabbedproperties.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+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 {
+
+ /** Plugin id */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.views.properties.tabbedproperties.core"; //$NON-NLS-1$
+
+ /**
+ * singleton instance of this plugin.
+ */
+ private static Activator plugin;
+
+ /**
+ * Creates a new Activator.
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ 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;
+ }
+
+ /**
+ * Logs an error into the plugin's log
+ *
+ * @param string
+ * the message of the error
+ */
+ public static void logWarning(String string) {
+ getDefault().getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, string));
+ }
+
+ /**
+ * Logs an error into the plugin's log
+ *
+ * @param string
+ * the message of the error
+ */
+ public static void logError(String string) {
+ getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, string));
+ }
+
+ /**
+ * Logs an exception into the plugin's log
+ *
+ * @param exception
+ * the exception to log
+ */
+ public static void logException(Exception exception) {
+ getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, exception.getLocalizedMessage(), exception));
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/providers/EMFObjectLabelProvider.java b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/providers/EMFObjectLabelProvider.java
new file mode 100644
index 00000000000..e13f0c096f9
--- /dev/null
+++ b/extraplugins/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.tabbedproperties.core/src/org/eclipse/papyrus/views/properties/tabbedproperties/core/providers/EMFObjectLabelProvider.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.views.properties.tabbedproperties.core.providers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This class handles title label for tabbed properties.
+ *
+ * @author Jerome Benois
+ */
+public class EMFObjectLabelProvider extends AdapterFactoryLabelProvider implements ILabelProvider {
+
+ private static final Class<?> IItemLabelProviderClass = IItemLabelProvider.class;
+
+ private static Map<String, AdapterFactory> factories = new HashMap<String, AdapterFactory>();
+
+ private static final String EXT_FACTORIES = "org.eclipse.emf.edit.itemProviderAdapterFactories"; //$NON-NLS-1$
+
+ public EMFObjectLabelProvider() {
+ super(new ReflectiveItemProviderAdapterFactory());
+ }
+
+ @Override
+ public String getText(Object element) {
+ String title = ""; //$NON-NLS-1$
+ EObject eObject = getModel(element);
+ IItemLabelProvider itemLabelProvider = getItemLabelProvider(eObject);
+ if(itemLabelProvider != null) {
+ title = itemLabelProvider.getText(eObject);
+ }
+
+ if("".equals(title)) { //$NON-NLS-1$
+ title = super.getText(eObject);
+ }
+
+ return title;
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ Image result = null;
+ EObject eObject = getModel(element);
+ IItemLabelProvider itemLabelProvider = getItemLabelProvider(eObject);
+ if(itemLabelProvider != null) {
+ result = getImageFromObject(itemLabelProvider.getImage(eObject));
+ }
+
+ return result;
+ }
+
+ private EObject getModel(Object element) {
+ EObject eObject = null;
+ if(element != null && element instanceof StructuredSelection) {
+ StructuredSelection selection = (StructuredSelection)element;
+ Object o = selection.getFirstElement();
+ eObject = resolveSemanticObject(o);
+ if(o instanceof IGraphicalEditPart) {
+ IGraphicalEditPart editPart = (IGraphicalEditPart)o;
+ eObject = editPart.resolveSemanticElement();
+ }
+ }
+ return eObject;
+ }
+
+ /**
+ * Resolve semantic element
+ *
+ * @param object
+ * the object to resolve
+ * @return <code>null</code> or the semantic element associated to the specified object
+ */
+ private EObject resolveSemanticObject(Object object) {
+ if(object instanceof EObject) {
+ return (EObject)object;
+ } else if(object instanceof IAdaptable) {
+ IAdaptable adaptable = (IAdaptable)object;
+ if(adaptable.getAdapter(EObject.class) != null) {
+ return (EObject)adaptable.getAdapter(EObject.class);
+ }
+ }
+ return null;
+ }
+
+ private IItemLabelProvider getItemLabelProvider(EObject eObject) {
+ IItemLabelProvider itemLabelProvider = null;
+ if(eObject != null) {
+ AdapterFactory adapterFactory = getEditFactory(eObject);
+ if(adapterFactory != null) {
+ return (IItemLabelProvider)adapterFactory.adapt(eObject, IItemLabelProviderClass);
+ }
+ }
+ return itemLabelProvider;
+ }
+
+ /**
+ * Gets the edit factory.
+ *
+ * @param eobject
+ * the eobject
+ *
+ * @return the edits the factory
+ */
+ public static AdapterFactory getEditFactory(EObject eobject) {
+ String uri = eobject.eClass().getEPackage().getNsURI();
+ return getFactory(uri);
+ }
+
+ /**
+ * Gets the factory from uri.
+ *
+ * @param uri
+ * the uri
+ *
+ * @return the factory
+ */
+ public static AdapterFactory getFactory(String uri) {
+ AdapterFactory factory = factories.get(uri);
+ if(factory == null) {
+ IConfigurationElement[] extensions = Platform.getExtensionRegistry().getConfigurationElementsFor(EXT_FACTORIES);
+ for(IConfigurationElement e : extensions) {
+ if(uri.equals(e.getAttribute("uri"))) { //$NON-NLS-1$
+ try {
+ factory = (AdapterFactory)e.createExecutableExtension("class"); //$NON-NLS-1$
+ if(factory != null) {
+ factories.put(uri, factory);
+ }
+ } catch (CoreException e1) {
+ // do nothing
+ }
+ }
+ }
+ }
+ return factory;
+ }
+
+}

Back to the top