diff options
author | eutarass | 2009-08-28 19:59:49 +0000 |
---|---|---|
committer | eutarass | 2009-08-28 19:59:49 +0000 |
commit | 7fdeaa34f2c825cad27477882c068527baed123f (patch) | |
tree | 8c587ffc89bef2fd8805f6289274f10d9c985ad5 /plugins | |
parent | 6d65ffaca552d9cc11b1a9b0d851759824d9ee9f (diff) | |
download | org.eclipse.tcf-7fdeaa34f2c825cad27477882c068527baed123f.tar.gz org.eclipse.tcf-7fdeaa34f2c825cad27477882c068527baed123f.tar.xz org.eclipse.tcf-7fdeaa34f2c825cad27477882c068527baed123f.zip |
Bug 287732: Unable to build org.eclipse.tm.tcf using headless build:
1. Created headless build project: features/org.eclipse.tm.tcf.headless.build
2. Changed org.eclipse.tm.tcf.core to be a plugin instead of fragment and added bundle activator class
Diffstat (limited to 'plugins')
13 files changed, 84 insertions, 14 deletions
diff --git a/plugins/org.eclipse.tm.tcf.core/.classpath b/plugins/org.eclipse.tm.tcf.core/.classpath index 872791733..0ad228c8c 100644 --- a/plugins/org.eclipse.tm.tcf.core/.classpath +++ b/plugins/org.eclipse.tm.tcf.core/.classpath @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="activator"/> <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="output" path="bin"/> </classpath> diff --git a/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF index 7e638c182..8ce8d0e75 100644 --- a/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF @@ -4,8 +4,13 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.tm.tcf.core;singleton:=true Bundle-Version: 0.3.0.qualifier -Fragment-Host: org.eclipse.tm.tcf;bundle-version="0.2.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: true +Bundle-Activator: org.eclipse.tm.internal.tcf.Activator +Import-Package: org.osgi.framework, + org.osgi.service.packageadmin, + org.osgi.util.tracker Export-Package: org.eclipse.tm.tcf.core;version="0.2.0", org.eclipse.tm.tcf.protocol;version="0.2.0", org.eclipse.tm.tcf.services;version="0.2.0", diff --git a/plugins/org.eclipse.tm.tcf.core/about.html b/plugins/org.eclipse.tm.tcf.core/about.html new file mode 100644 index 000000000..6c5b3615b --- /dev/null +++ b/plugins/org.eclipse.tm.tcf.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>January 10, 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/">http://www.eclipse.org</a>.</p> + +</body> +</html>
\ No newline at end of file diff --git a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java b/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java new file mode 100644 index 000000000..d726ff6e0 --- /dev/null +++ b/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java @@ -0,0 +1,36 @@ +package org.eclipse.tm.internal.tcf; + +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.service.packageadmin.PackageAdmin; +import org.osgi.util.tracker.ServiceTracker; + +public class Activator implements BundleActivator { + + private static final String TCF_INTEGRATION_BUNDLE_ID = "org.eclipse.tm.tcf"; + + public void start(BundleContext context) throws Exception { + /* + * Activate TCF Eclipse integration bundle "org.eclipse.tm.tcf". + * It must be activated explicitly, because default activation through + * class loading may never happen - most client don't need classes from that bundle. + */ + ServiceTracker tracker = new ServiceTracker(context, PackageAdmin.class.getName(), null); + tracker.open(); + Bundle[] bundles = ((PackageAdmin)tracker.getService()).getBundles(TCF_INTEGRATION_BUNDLE_ID, null); + int cnt = 0; + if (bundles != null) { + for (Bundle bundle : bundles) { + if ((bundle.getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) { + bundle.start(Bundle.START_TRANSIENT); + cnt++; + } + } + } + if (cnt != 1) throw new Exception("Invalid or missing bundle: " + TCF_INTEGRATION_BUNDLE_ID); + } + + public void stop(BundleContext context) throws Exception { + } +} diff --git a/plugins/org.eclipse.tm.tcf.core/build.properties b/plugins/org.eclipse.tm.tcf.core/build.properties index 34d2e4d2d..28843de8d 100644 --- a/plugins/org.eclipse.tm.tcf.core/build.properties +++ b/plugins/org.eclipse.tm.tcf.core/build.properties @@ -1,4 +1,8 @@ -source.. = src/ +source.. = src/,\ + activator/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + plugin.properties,\ + about.html +src.includes = about.html diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/.cvsignore b/plugins/org.eclipse.tm.tcf.debug.ui/.cvsignore deleted file mode 100644 index 092357e47..000000000 --- a/plugins/org.eclipse.tm.tcf.debug.ui/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin
diff --git a/plugins/org.eclipse.tm.tcf.debug/.cvsignore b/plugins/org.eclipse.tm.tcf.debug/.cvsignore deleted file mode 100644 index c5e82d745..000000000 --- a/plugins/org.eclipse.tm.tcf.debug/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin
\ No newline at end of file diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java index bdcdfe4d6..d59107414 100644 --- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java +++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java @@ -64,10 +64,8 @@ public class TCFFileService extends AbstractFileService { private UserInfo user_info; private static final class UserInfo { - @SuppressWarnings("unused") final int r_uid; final int e_uid; - @SuppressWarnings("unused") final int r_gid; final int e_gid; final String home; diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java index 58bb2f215..dbd93e8e0 100644 --- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java +++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java @@ -51,6 +51,7 @@ import org.eclipse.tm.tcf.services.ISysMonitor; import org.eclipse.ui.views.properties.IPropertyDescriptor; +@SuppressWarnings("restriction") public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter, ISystemRemoteElementAdapter{ diff --git a/plugins/org.eclipse.tm.tcf/.classpath b/plugins/org.eclipse.tm.tcf/.classpath index 0182778c5..304e86186 100644 --- a/plugins/org.eclipse.tm.tcf/.classpath +++ b/plugins/org.eclipse.tm.tcf/.classpath @@ -3,6 +3,5 @@ <classpathentry kind="src" path="src"/> <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 combineaccessrules="false" exported="true" kind="src" path="/org.eclipse.tm.tcf.core"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/plugins/org.eclipse.tm.tcf/.cvsignore b/plugins/org.eclipse.tm.tcf/.cvsignore deleted file mode 100644 index c5e82d745..000000000 --- a/plugins/org.eclipse.tm.tcf/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin
\ No newline at end of file diff --git a/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF index 673a02070..827f07e41 100644 --- a/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF @@ -1,14 +1,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName +Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.tm.tcf;singleton:=true Bundle-Version: 0.3.0.qualifier -Bundle-Activator: org.eclipse.tm.tcf.Activator -Bundle-Vendor: %providerName -Require-Bundle: org.eclipse.core.runtime Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ActivationPolicy: lazy Eclipse-LazyStart: true -Eclipse-ExtensibleAPI: true +Require-Bundle: org.eclipse.core.runtime +Bundle-Activator: org.eclipse.tm.tcf.Activator +Import-Package: org.eclipse.tm.tcf.core;version="0.2.0", + org.eclipse.tm.tcf.protocol;version="0.2.0" Export-Package: org.eclipse.tm.tcf.extensions, org.eclipse.tm.tcf.ssl;version="0.2.0" diff --git a/plugins/org.eclipse.tm.tcf/build.properties b/plugins/org.eclipse.tm.tcf/build.properties index 01f47230f..4a5fbbd0f 100644 --- a/plugins/org.eclipse.tm.tcf/build.properties +++ b/plugins/org.eclipse.tm.tcf/build.properties @@ -1,6 +1,5 @@ source.. = src/ output.. = bin/ -extra.. = ../org.eclipse.tm.tcf.core/bin bin.includes = META-INF/,\ .,\ about.html,\ |