diff options
author | mkuppe | 2008-12-12 08:12:54 +0000 |
---|---|---|
committer | mkuppe | 2008-12-12 08:12:54 +0000 |
commit | 5c143d78c115077d5d48f60604657300b3d211c7 (patch) | |
tree | 53944a2fe62a266d426e031f25dca63cbff7a9ce /framework/bundles/org.eclipse.ecf.discovery.ui.properties | |
parent | 110885115de5961c8171cbc39ad1be6ea818c658 (diff) | |
download | org.eclipse.ecf-5c143d78c115077d5d48f60604657300b3d211c7.tar.gz org.eclipse.ecf-5c143d78c115077d5d48f60604657300b3d211c7.tar.xz org.eclipse.ecf-5c143d78c115077d5d48f60604657300b3d211c7.zip |
NEW - bug 256603: [Discovery][Remotesvcs] Replace org.eclipse.ecf.discovery.ui with EMF based ui (CQ 2038)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256603
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.discovery.ui.properties')
8 files changed, 147 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.classpath b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.classpath new file mode 100644 index 000000000..2fbb7a23e --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.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.4"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.project b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.project new file mode 100644 index 000000000..3ebb93800 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.ecf.discovery.ui.properties</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/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.settings/org.eclipse.jdt.core.prefs b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..6d5ead095 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Fri Dec 05 15:34:32 CET 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/META-INF/MANIFEST.MF new file mode 100644 index 000000000..bc7361896 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ECF Properties Fragment +Bundle-SymbolicName: org.eclipse.ecf.discovery.ui.properties;singleton:=true +Bundle-Version: 3.0.0.qualifier +Bundle-Vendor: Eclipse.org +Fragment-Host: org.eclipse.ecf.discovery.ui;bundle-version="[3.0.0,4.0.0)" +Bundle-RequiredExecutionEnvironment: J2SE-1.4 diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/about.html b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/about.html new file mode 100644 index 000000000..4c79781a5 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/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>June 25, 2008</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") 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</a>.</p> + +</body> +</html>
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/build.properties b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/build.properties new file mode 100644 index 000000000..c5c94d909 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.xml,\ + about.html diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/fragment.xml b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/fragment.xml new file mode 100644 index 000000000..762e3eb73 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/fragment.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<plugin> + <!-- map from EMF models to platform's property sources --> + <extension + point="org.eclipse.core.runtime.adapters"> + <factory + adaptableType="org.eclipse.emf.ecore.EObject" + class="org.eclipse.ecf.internal.discovery.ui.EObjectPropertySourceFactory"> + <adapter + type="org.eclipse.ui.views.properties.IPropertySource"> + </adapter> + </factory> + </extension> +</plugin> diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.properties/src/org/eclipse/ecf/internal/discovery/ui/EObjectPropertySourceFactory.java b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/src/org/eclipse/ecf/internal/discovery/ui/EObjectPropertySourceFactory.java new file mode 100644 index 000000000..02a1dff4a --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.discovery.ui.properties/src/org/eclipse/ecf/internal/discovery/ui/EObjectPropertySourceFactory.java @@ -0,0 +1,48 @@ +/**************************************************************************** + * Copyright (c) 2008 Versant Corp. and others. + * 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: + * Markus Alexander Kuppe - initial API and implementation + *****************************************************************************/ +package org.eclipse.ecf.internal.discovery.ui; + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.runtime.IAdapterFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.ui.provider.PropertySource; +import org.eclipse.ui.views.properties.IPropertySource; + +public class EObjectPropertySourceFactory implements IAdapterFactory { + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) + */ + public Object getAdapter(Object adaptableObject, Class adapterType) { + if (adapterType.equals(IPropertySource.class) && adaptableObject instanceof EObject) { + EObject eObj = (EObject) adaptableObject; + List adapters = eObj.eAdapters(); + for (Iterator itr = adapters.iterator(); itr.hasNext();) { + Object adapter = itr.next(); + if (adapter instanceof IItemPropertySource) { + //TODO handle the case with multiple IItemPropertySource adapters for this EObject + return new PropertySource(adaptableObject, (IItemPropertySource) adapter); + } + } + } + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() + */ + public Class[] getAdapterList() { + return new Class[] { IPropertySource.class }; + } +} |