diff options
author | John Arthorne | 2012-08-14 21:00:15 +0000 |
---|---|---|
committer | John Arthorne | 2012-08-14 21:00:15 +0000 |
commit | ef93f6e228e1e44a8d91cdb2c76ee9dea1d25c6e (patch) | |
tree | a7c49bc166f1b983789a7d9c7207323a80bbc551 | |
parent | b23aa97a7846e5f51793afc5bc8523ec1c85e4c0 (diff) | |
download | eclipse.platform.ua-ef93f6e228e1e44a8d91cdb2c76ee9dea1d25c6e.tar.gz eclipse.platform.ua-ef93f6e228e1e44a8d91cdb2c76ee9dea1d25c6e.tar.xz eclipse.platform.ua-ef93f6e228e1e44a8d91cdb2c76ee9dea1d25c6e.zip |
Remove unused bundle to avoid confusionv20120814-210015I20120828-0800I20120821-0800
20 files changed, 3 insertions, 1054 deletions
diff --git a/org.eclipse.help.appserver/.classpath b/org.eclipse.help.appserver/.classpath deleted file mode 100644 index 2fbb7a23e..000000000 --- a/org.eclipse.help.appserver/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/org.eclipse.help.appserver/.project b/org.eclipse.help.appserver/.project index 42034d143..9c8c3337b 100644 --- a/org.eclipse.help.appserver/.project +++ b/org.eclipse.help.appserver/.project @@ -5,30 +5,7 @@ <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> - <buildCommand> - <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name> - <arguments> - </arguments> - </buildCommand> </buildSpec> <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature> </natures> </projectDescription> diff --git a/org.eclipse.help.appserver/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.help.appserver/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index fae341bc0..000000000 --- a/org.eclipse.help.appserver/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,57 +0,0 @@ -#Wed Apr 26 14:28:46 EDT 2006 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1 -org.eclipse.jdt.core.compiler.compliance=1.3 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error -org.eclipse.jdt.core.compiler.problem.nullReference=ignore -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.3 diff --git a/org.eclipse.help.appserver/META-INF/MANIFEST.MF b/org.eclipse.help.appserver/META-INF/MANIFEST.MF deleted file mode 100644 index a62abd41c..000000000 --- a/org.eclipse.help.appserver/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %appserver_plugin_name -Bundle-SymbolicName: org.eclipse.help.appserver; singleton:=true -Bundle-Version: 3.1.400.qualifier -Bundle-ClassPath: . -Bundle-Activator: org.eclipse.help.internal.appserver.AppserverPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Export-Package: org.eclipse.help.internal.appserver;x-friends:="org.eclipse.help.base,org.eclipse.help.ui,org.eclipse.ua.tests,org.eclipse.tomcat" -Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.4, - CDC-1.0/Foundation-1.0, - J2SE-1.3 diff --git a/org.eclipse.help.appserver/about.html b/org.eclipse.help.appserver/about.html deleted file mode 100644 index 460233046..000000000 --- a/org.eclipse.help.appserver/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!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 2, 2006</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/org.eclipse.help.appserver/build.properties b/org.eclipse.help.appserver/build.properties deleted file mode 100644 index 05091fb3c..000000000 --- a/org.eclipse.help.appserver/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2005 IBM Corporation 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: -# IBM Corporation - initial API and implementation -############################################################################### -source..=src/ -src.includes=schema/,about.html -bin.includes = plugin.xml,\ - preferences.ini,\ - .,\ - plugin.properties,\ - about.html,\ - META-INF/ - diff --git a/org.eclipse.help.appserver/plugin.properties b/org.eclipse.help.appserver/plugin.properties deleted file mode 100644 index a04d28434..000000000 --- a/org.eclipse.help.appserver/plugin.properties +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2007 IBM Corporation 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: -# IBM Corporation - initial API and implementation -############################################################################### -appserver_plugin_name = Help Application Server -providerName=Eclipse.org -server = Application Server - - diff --git a/org.eclipse.help.appserver/plugin.xml b/org.eclipse.help.appserver/plugin.xml deleted file mode 100644 index 40d3183a4..000000000 --- a/org.eclipse.help.appserver/plugin.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin> - - <extension-point id="server" name="%server" schema="schema/server.exsd"/> - -</plugin> diff --git a/org.eclipse.help.appserver/pom.xml b/org.eclipse.help.appserver/pom.xml deleted file mode 100644 index 310d2ef36..000000000 --- a/org.eclipse.help.appserver/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (c) 2012 Eclipse Foundation. - All rights reserved. This program and the accompanying materials - are made available under the terms of the Eclipse Distribution License v1.0 - which accompanies this distribution, and is available at - http://www.eclipse.org/org/documents/edl-v10.php - - Contributors: - Igor Fedorenko - initial implementation ---> - -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>eclipse.platform.ua</artifactId> - <groupId>eclipse.platform.ua</groupId> - <version>3.8.0-SNAPSHOT</version> - </parent> - <groupId>eclipse.platform.ua</groupId> - <artifactId>org.eclipse.help.appserver</artifactId> - <version>3.1.400-SNAPSHOT</version> - <packaging>eclipse-plugin</packaging> -</project> diff --git a/org.eclipse.help.appserver/preferences.ini b/org.eclipse.help.appserver/preferences.ini deleted file mode 100644 index 53b8feaa2..000000000 --- a/org.eclipse.help.appserver/preferences.ini +++ /dev/null @@ -1,8 +0,0 @@ -# The port number on which the sever listens for http requests. -# If the port is 0 and arbitrary port is picked by the system. -port= - -# The host address or name to use for connecting to the server. -# The default is nothing, and eclipse will pick up an available local address. -host= - diff --git a/org.eclipse.help.appserver/readme.txt b/org.eclipse.help.appserver/readme.txt new file mode 100644 index 000000000..52fa337d0 --- /dev/null +++ b/org.eclipse.help.appserver/readme.txt @@ -0,0 +1,3 @@ +This bundle used to contain a tomcat-based web server for the Eclipse platform help system.
+The bundle was last used in the Eclipse 3.2 release, and was completely removed in the 4.1 release.
+For details see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=216322.
\ No newline at end of file diff --git a/org.eclipse.help.appserver/schema/server.exsd b/org.eclipse.help.appserver/schema/server.exsd deleted file mode 100644 index 4ef1b176c..000000000 --- a/org.eclipse.help.appserver/schema/server.exsd +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.help.appserver">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.help.appserver" id="server" name="server"/>
- </appInfo>
- <documentation>
- Internal extension point to plug in an application server for help and other eclipse plugins.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element deprecated="true"/>
- </appInfo>
- <documentation>
- This extension point which was based on internal classes is deprecated and should not be used. It is likely to be removed in a future release. Use the HTTP service implementation provided by Equinox that is based on Jetty, see http://www.eclipse.org/equinox/server.
-
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="server"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="server">
- <annotation>
- <appInfo>
- <meta.element deprecated="true"/>
- </appInfo>
- <documentation>
- This extension point which was based on internal classes is deprecated and should not be used. It is likely to be removed in a future release. Use the HTTP service implementation provided by Equinox that is based on Jetty, see http://www.eclipse.org/equinox/server.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The contributors to this extension point must implement the org.eclipse.help.appserver.internal.IWebappServer interface.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="default" type="boolean" use="default" value="false">
- <annotation>
- <documentation>
- When set to true, this is the default application server. Normally, only the platform contributed default implementation should set this attribute to true.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is a sample usage of the server extension point:
-<p>
-<samp>
-&lt;extension id="appserver" name="Tomcat" point="org.eclipse.help.appserver.server"&gt;
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;server class="org.eclipse.tomcat.internal.TomcatAppServer" default="true" /&gt;
-<br> &lt;/extension&gt;
-</samp>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The supplied class must implement the
-<tt>org.eclipse.help.internal.appserver.IWebappServer</tt>
-interface. Methods in that interface control starting and stopping of the application server,
-as well as starting and stopping of a web application.
-Web applications must have direct access to classes loaded by the customized class loader passed in when starting the web application.
-<p>
-In addition to this, all the web applications running under the provided application server must have access to the Jasper 1 JSP Engine runtime. These libraries are currently shipped with Tomcat 4.0.x drivers (http://jakarta.apache.org).
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Eclipse Platform provides an implementation of this extension point using the Apache Tomcat
-application server.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2002, 2005 IBM Corporation and others.<br>
-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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverPlugin.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverPlugin.java deleted file mode 100644 index 64bc6b0ab..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverPlugin.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.help.internal.appserver; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.BundleContext; - -/** - */ -public class AppserverPlugin extends Plugin { - public final static String PLUGIN_ID = "org.eclipse.help.appserver"; //$NON-NLS-1$ - public final static String HOST_KEY = "host"; //$NON-NLS-1$ - public final static String PORT_KEY = "port"; //$NON-NLS-1$ - private final static String APP_SERVER_EXTENSION_ID = PLUGIN_ID + ".server"; //$NON-NLS-1$ - private static final String APP_SERVER_CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$ - private static final String APP_SERVER_DEFAULT_ATTRIBUTE = "default"; //$NON-NLS-1$ - // singleton object - private static AppserverPlugin plugin; -// private static BundleContext bundleContext; - private IWebappServer appServer; - private String contributingServerPlugin; - private String hostAddress; - private int port; - /** - */ - public static AppserverPlugin getDefault() { - return plugin; - } - /** - * Returns the instance of WebappServer. - */ - public synchronized IWebappServer getAppServer() throws CoreException { - if (appServer == null) { - createWebappServer(); - startWebappServer(); - } - return appServer; - } - /** - * Logs an Error message with an exception. - */ - public static synchronized void logError(String message, Throwable ex) { - if (message == null) - message = ""; //$NON-NLS-1$ - Status errorStatus = new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, - message, ex); - AppserverPlugin.getDefault().getLog().log(errorStatus); - } - /* - * (non-Javadoc) - * - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - if (appServer != null) { - appServer.stop(); - } - plugin = null; -// bundleContext = null; - super.stop(context); - } - /* - * (non-Javadoc) - * - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; -// bundleContext = context; - } - /** - * Returns the plugin ID that contributes the server implementation - * - * @return String - */ - public String getContributingServerPlugin() { - return contributingServerPlugin; - } - private void createWebappServer() throws CoreException { - // Initializes the app server by getting an instance via - // app-server the extension point - // get the app server extension from the system plugin registry - IExtensionPoint point = Platform.getExtensionRegistry() - .getExtensionPoint(APP_SERVER_EXTENSION_ID); - if (point != null) { - IExtension[] extensions = point.getExtensions(); - if (extensions.length != 0) { - // We need to pick up the non-default configuration - IConfigurationElement[] elements = extensions[0] - .getConfigurationElements(); - if (elements.length == 0) - return; - IConfigurationElement serverElement = null; - for (int i = 0; i < elements.length; i++) { - String defaultValue = elements[i] - .getAttribute(APP_SERVER_DEFAULT_ATTRIBUTE); - if (defaultValue == null || defaultValue.equals("false")) { //$NON-NLS-1$ - serverElement = elements[i]; - break; - } - } - // if all the servers are default, then pick the first one - if (serverElement == null) - serverElement = elements[0]; - // Instantiate the app server - try { - appServer = (IWebappServer) serverElement - .createExecutableExtension(APP_SERVER_CLASS_ATTRIBUTE); - contributingServerPlugin = serverElement - .getContributor().getName(); - } catch (CoreException e) { - getLog().log(e.getStatus()); - throw e; - } - } - } - } - private void startWebappServer() throws CoreException { - // Initialize host and port from preferences - hostAddress = getPluginPreferences().getString(HOST_KEY); - if ("".equals(hostAddress)) { //$NON-NLS-1$ - hostAddress = null; - } - port = getPluginPreferences().getInt(PORT_KEY); - // apply host and port overrides passed as command line arguments - try { - String hostCommandLineOverride = System.getProperty("server_host"); //$NON-NLS-1$ - if (hostCommandLineOverride != null - && hostCommandLineOverride.trim().length() > 0) { - hostAddress = hostCommandLineOverride; - } - } catch (Exception e) { - } - try { - String portCommandLineOverride = System.getProperty("server_port"); //$NON-NLS-1$ - if (portCommandLineOverride != null - && portCommandLineOverride.trim().length() > 0) { - port = Integer.parseInt(portCommandLineOverride); - } - } catch (Exception e) { - } - if (appServer == null) - throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, - IStatus.OK, - AppserverResources.Appserver_start, null)); - appServer.start(port, hostAddress); - } -} diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverResources.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverResources.java deleted file mode 100644 index 2d96fa978..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverResources.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.help.internal.appserver; - -import org.eclipse.osgi.util.NLS; - -public final class AppserverResources extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.help.internal.appserver.AppserverResources";//$NON-NLS-1$ - - private AppserverResources() { - // Do not instantiate - } - - public static String LocalConnectionTest_cannotGetLocalhostName; - public static String Appserver_cannotFindPlugin; - public static String Appserver_cannotFindPath; - public static String Appserver_cannotResolvePath; - public static String Appserver_engineRemove; - public static String Appserver_embeddedStop; - public static String Appserver_addingWebapp; - public static String Appserver_start; - - static { - NLS.initializeMessages(BUNDLE_NAME, AppserverResources.class); - } -}
\ No newline at end of file diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverResources.properties b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverResources.properties deleted file mode 100644 index a7913630b..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/AppserverResources.properties +++ /dev/null @@ -1,19 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2007 IBM Corporation 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: -# IBM Corporation - initial API and implementation -############################################################################### -LocalConnectionTest_cannotGetLocalhostName = Host name of local machine cannot be obtained. - -Appserver_cannotFindPlugin = Location of plug-in {0} cannot be obtained. -Appserver_cannotFindPath = Location of path {1} in plug-in {0} cannot be obtained. -Appserver_cannotResolvePath = Location of path {1} in plug-in {0} cannot be resolved. -Appserver_engineRemove = Exception occurred during removing an engine from embedded application server. -Appserver_embeddedStop = Exception occurred during stopping embedded server. -Appserver_addingWebapp = Exception occurred adding webapp {0} based at {1}. -Appserver_start = Exception occurred starting application server. diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/DevClassPathHelper.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/DevClassPathHelper.java deleted file mode 100644 index 6bec763da..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/DevClassPathHelper.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.help.internal.appserver; - -import java.io.*; -import java.net.*; -import java.util.*; - -/** - * Class copied from org.eclipse.osgi.framework.internal.defaultadaptor - */ -public class DevClassPathHelper { - static protected boolean inDevelopmentMode = false; - static protected String[] devDefaultClasspath; - static protected Properties devProperties = null; - - static { - // Check the osgi.dev property to see if dev classpath entries have been - // defined. - String osgiDev = System.getProperty("osgi.dev"); //$NON-NLS-1$ - if (osgiDev != null) { - try { - inDevelopmentMode = true; - URL location = new URL(osgiDev); - devProperties = load(location); - if (devProperties != null) - devDefaultClasspath = getArrayFromList(devProperties - .getProperty("*")); //$NON-NLS-1$ - } catch (MalformedURLException e) { - devDefaultClasspath = getArrayFromList(osgiDev); - } - } - } - - public static String[] getDevClassPath(String id) { - String[] result = null; - if (id != null && devProperties != null) { - String entry = devProperties.getProperty(id); - if (entry != null) - result = getArrayFromList(entry); - } - if (result == null) - result = devDefaultClasspath; - return result; - } - - /** - * Returns the result of converting a list of comma-separated tokens into an - * array - * - * @return the array of string tokens - * @param prop - * the initial comma-separated string - */ - public static String[] getArrayFromList(String prop) { - if (prop == null || prop.trim().equals("")) //$NON-NLS-1$ - return new String[0]; - Vector list = new Vector(); - StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$ - while (tokens.hasMoreTokens()) { - String token = tokens.nextToken().trim(); - if (!token.equals("")) //$NON-NLS-1$ - list.addElement(token); - } - return list.isEmpty() ? new String[0] : (String[]) list - .toArray(new String[list.size()]); - } - - public static boolean inDevelopmentMode() { - return inDevelopmentMode; - } - - /* - * Load the given properties file - */ - private static Properties load(URL url) { - Properties props = new Properties(); - try { - InputStream is = null; - try { - is = url.openStream(); - props.load(is); - } finally { - if (is != null) - is.close(); - } - } catch (IOException e) { - AppserverPlugin.logError("Help failed to load properties file " + url, e); //$NON-NLS-1$ - } - return props; - } -} diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/IWebappServer.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/IWebappServer.java deleted file mode 100644 index 70b52771c..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/IWebappServer.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.help.internal.appserver; - -import org.eclipse.core.runtime.*; - -/** - * Interface to be implemented by the app servers that are contributed to the - * org.eclipse.webapp.server extension point. The implementors of this class - * should ensure that webapps are running in an environment in which they can - * see their classes, the J2SE/J2EE classes, as well as classes loaded by the - * custom class loader. - * - * @since 2.1 - * @deprecated This internal interface is no longer used by the Eclipse Help - * system and should not be used by anyone else. It is likely to be removed - * in a future release. - * Use the HTTP service implementation provided by Equinox that is based - * on Jetty, see http://www.eclipse.org/equinox/server. - */ -public interface IWebappServer { - /** - * Starts the server on specified host/port. Must be called before running a - * webapp. - * - * @param port - * port to listen to. Pass 0 to let the system pick up a port. - * @param host - * server host. Can be an IP address or a server name - */ - public void start(int port, String host) throws CoreException; - - /** - * Stops the app server. - */ - public void stop() throws CoreException; - - /** - * Checks if the app server is running - */ - public boolean isRunning(); - - /** - * Runs a webapp on the server. - * - * @param webappName - * the name of the web app (also knowns as application context) - * @param path - * path to the webapp directory or WAR file. - * @param customLoader - * optional class loader to add to the default webapp class - * loader - */ - public void start(String webappName, IPath path, ClassLoader customLoader) - throws CoreException; - - /** - * Stops the specified webapp. - */ - public void stop(String webappName) throws CoreException; - - /** - * Returns the port number the app server listens on. - * - * @return integer port number, 0 if server not started - */ - public int getPort(); - - /** - * Returns the host name or ip the app server runs on. - * - * @return String representaion of host name of IP, null if server not - * started yet - */ - public String getHost(); -} diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java deleted file mode 100644 index b97222ae0..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.help.internal.appserver; -import java.io.*; -import java.net.*; -import java.util.*; - -import org.eclipse.core.runtime.*; -import org.eclipse.osgi.util.*; -import org.osgi.framework.*; -/** - * Wrapper for a plugin class loader. This class is only needed because the - * current PluginClassLoader is not clearly exposed as a URLClassLoader and its - * getURLs() method does not properly return the list of url's (it misses - * required jars, etc.) - */ -public class PluginClassLoaderWrapper extends URLClassLoader { - private String plugin; - private Bundle bundle; - public PluginClassLoaderWrapper(String plugin) { - super(new URL[0]); - this.plugin = plugin; - this.bundle = Platform.getBundle(plugin); - } - public Class loadClass(String className) throws ClassNotFoundException { - return bundle.loadClass(className); - } - public URL getResource(String resName) { - return bundle.getResource(resName); - } - /** - * This is a workaround for the jsp compiler that needs to know the - * classpath. - */ - public URL[] getURLs() { - Set urls = getPluginClasspath(plugin); - return (URL[]) urls.toArray(new URL[urls.size()]); - } - private Set getPluginClasspath(String pluginId) { - // Collect set of plug-ins - Set plugins = new HashSet(); - addPluginWithPrereqs(pluginId, plugins); - // Collect URLs for each plug-in - Set urls = new HashSet(); - for (Iterator it = plugins.iterator(); it.hasNext();) { - String id = (String) it.next(); - try { - Bundle b = Platform.getBundle(id); - if (b != null) { - // declared classpath - String headers = (String) b.getHeaders().get( - Constants.BUNDLE_CLASSPATH); - ManifestElement[] paths = ManifestElement.parseHeader( - Constants.BUNDLE_CLASSPATH, headers); - if (paths != null) { - for (int i = 0; i < paths.length; i++) { - String path = paths[i].getValue(); - URL url = b.getEntry(path); - if (url != null) - try { - urls.add(FileLocator.toFileURL(url)); - } catch (IOException ioe) { - } - } - } - // dev classpath - String[] devpaths = DevClassPathHelper - .getDevClassPath(pluginId); - if (devpaths != null) { - for (int i = 0; i < devpaths.length; i++) { - URL url = b.getEntry(devpaths[i]); - if (url != null) - try { - urls.add(FileLocator.toFileURL(url)); - } catch (IOException ioe) { - } - } - } - } - } catch (BundleException e) { - } - } - return urls; - } - /** - * Ensures set contains plugin ID of given plugin and all its prereqs. Does - * nothing if set contains given plug-in. - */ - private void addPluginWithPrereqs(String pluginId, Set pluginIds) { - if (pluginIds.contains(pluginId)) { - return; - } - String[] immidiatePrereqs = getDirectPrereqs(pluginId); - for (int i = 0; i < immidiatePrereqs.length; i++) { - addPluginWithPrereqs(immidiatePrereqs[i], pluginIds); - } - pluginIds.add(pluginId); - } - /** - * Obtain plug-ins immidiately required by given plug-in - * - * @param pluginId - * @return - */ - private String[] getDirectPrereqs(String pluginId) { - try { - Bundle bundle = Platform.getBundle(pluginId); - if (bundle != null) { - String header = (String) bundle.getHeaders().get( - Constants.REQUIRE_BUNDLE); - ManifestElement[] requires = ManifestElement.parseHeader( - Constants.REQUIRE_BUNDLE, header); - if (requires != null) { - String[] reqs = new String[requires.length]; - for (int i = 0; i < requires.length; i++) { - reqs[i] = requires[i].getValue(); - } - return reqs; - } - } - } catch (BundleException e) { - } - return new String[0]; - } -} diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/WebappManager.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/WebappManager.java deleted file mode 100644 index d240ddca7..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/WebappManager.java +++ /dev/null @@ -1,139 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.help.internal.appserver; - -import java.io.*; -import java.net.*; - -import org.eclipse.core.runtime.*; -import org.eclipse.osgi.util.NLS; -import org.osgi.framework.*; - -/** - * Singleton class to be called by clients to run a webapp. - * - * @since 2.1 - * @deprecated This internal interface is no longer used by the Eclipse Help - * system and should not be used by anyone else. It is likely to be removed - * in a future release. - * Use the HTTP service implementation provided by Equinox that is based - * on Jetty, see http://www.eclipse.org/equinox/server. - */ -public class WebappManager { - private static boolean applicationsStarted = false; - - /** - * Private constructor, so no instances can be created. - * - * @see java.lang.Object#Object() - */ - private WebappManager() { - } - - /** - * Runs a webapp on the server. The webapp is defined in a plugin and the - * path is relative to the plugin directory. - * <p> - * It is assumed that webapp names are unique. It is suggested to create - * unique web app names by prefixing them with the plugin id. - * </p> - * - * @param webappName - * the name of the web app (also knowns as application context) - * @param pluginId - * plugin that defines the webapp - * @param path - * webapp relative path to the plugin directory - */ - public static void start(String webappName, String pluginId, IPath path) - throws CoreException { - - IPath webappPath = getWebappPath(pluginId, path); - - // we get the server before constructing the class loader, so - // class loader exposed by the server is available to the webapps. - IWebappServer server = AppserverPlugin.getDefault().getAppServer(); - applicationsStarted = true; - server.start(webappName, webappPath, new PluginClassLoaderWrapper( - pluginId)); - } - - /** - * Stops the specified webapp. - */ - public static void stop(String webappName) throws CoreException { - if (!applicationsStarted) { - // do not obtain (start) appserver when no reason - return; - } - AppserverPlugin.getDefault().getAppServer().stop(webappName); - } - - /** - * Returns the port number the app server listens on. - * - * @return integer port number, 0 if server not started - */ - public static int getPort() { - try { - return AppserverPlugin.getDefault().getAppServer().getPort(); - } catch (CoreException e) { - return 0; - } - } - - /** - * Returns the host name or ip the app server runs on. - * - * @return String representaion of host name of IP, null if server not - * started yet - */ - public static String getHost() { - try { - return AppserverPlugin.getDefault().getAppServer().getHost(); - } catch (CoreException e) { - return null; - } - } - - /** - * @param pluginId - * @param path - * webapp path relative to the plugin directory - * @return String absolute webapp path - */ - private static IPath getWebappPath(String pluginId, IPath path) - throws CoreException { - - Bundle bundle = Platform.getBundle(pluginId); - if (bundle == null) { - throw new CoreException(new Status(IStatus.ERROR, - AppserverPlugin.PLUGIN_ID, IStatus.OK, NLS.bind(AppserverResources.Appserver_cannotFindPlugin, pluginId), null)); - } - - // Note: we just look for one webapp directory. - // If needed, may want to use the locale specific path. - URL webappURL = FileLocator.find(bundle, path, null); - if (webappURL == null) { - throw new CoreException(new Status(IStatus.ERROR, - AppserverPlugin.PLUGIN_ID, IStatus.OK, NLS.bind(AppserverResources.Appserver_cannotFindPath, pluginId, path.toOSString()), null)); - } - - try { - String webappLocation = FileLocator.toFileURL( - FileLocator.resolve(webappURL)).getFile(); - return new Path(webappLocation); - } catch (IOException ioe) { - throw new CoreException(new Status(IStatus.ERROR, - AppserverPlugin.PLUGIN_ID, IStatus.OK, NLS.bind(AppserverResources.Appserver_cannotResolvePath, pluginId, path.toOSString()), ioe)); - } - } -} diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/package.html b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/package.html deleted file mode 100644 index 3cdf85584..000000000 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/package.html +++ /dev/null @@ -1,41 +0,0 @@ -<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> -<html> -<head> -<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <meta name="Author" content="IBM"> - <title>Package-level Javadoc</title> -</head> -<body> -Provides core support for an internal Eclipse application server. - -<h2> -Package Specification</h2> -The package defines the interface for contributing an application server -as well as the class that lets clients run their plugin contributed web applications. -<p>The actual application server an optional piece that plugs -in to the platform's standard <tt>org.eclipse.help.appserver.server</tt> extension -point. Only one application server will be selected from the list of all contributors. -The platform provides its own default application server. -In general terms, implementing an application server involves: -<ul> -<li> -Implementing the <tt>IWebappServer</tt> interface to allow starting/stopping the app server, -starting/stopping a web application.</li> - -<li> -Declaring an extension of the <tt>org.eclipse.help.appserver.server</tt> extension -point that mentions the name of that class.</li> - -<li> -Ensuring that the web application have access to classes loaded by a customized class loader. - </li> -</ul> -Note that the platform declares a plug-in (<tt>org.eclipse.tomcat</tt>) -which implements the server extension point. This plug-in is declared as default, -and any other replacement must not be defined as a default server. -<br> -<br> -<br> -</body> -</html> |