diff options
Diffstat (limited to 'plugins/org.eclipse.wst.server.preview')
24 files changed, 0 insertions, 1035 deletions
diff --git a/plugins/org.eclipse.wst.server.preview/.classpath b/plugins/org.eclipse.wst.server.preview/.classpath deleted file mode 100644 index 304e86186..000000000 --- a/plugins/org.eclipse.wst.server.preview/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <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 kind="output" path="bin"/> -</classpath> diff --git a/plugins/org.eclipse.wst.server.preview/.cvsignore b/plugins/org.eclipse.wst.server.preview/.cvsignore deleted file mode 100644 index 36a2b7489..000000000 --- a/plugins/org.eclipse.wst.server.preview/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -bin -build.xml -org.eclipse.wst.server.core_3.0.0.jar -temp.folder -@dot -src.zip -javaCompiler...args diff --git a/plugins/org.eclipse.wst.server.preview/.options b/plugins/org.eclipse.wst.server.preview/.options deleted file mode 100644 index b7f83908f..000000000 --- a/plugins/org.eclipse.wst.server.preview/.options +++ /dev/null @@ -1,4 +0,0 @@ -# Debugging options for the org.eclipse.wst.server.preview plugin - -# Turn on general debugging -org.eclipse.wst.server.preview/debug=true diff --git a/plugins/org.eclipse.wst.server.preview/.project b/plugins/org.eclipse.wst.server.preview/.project deleted file mode 100644 index 7ad37a7c7..000000000 --- a/plugins/org.eclipse.wst.server.preview/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.wst.server.preview</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.jdt.core.javanature</nature> - <nature>org.eclipse.pde.PluginNature</nature> - </natures> -</projectDescription> diff --git a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index c8be4323e..000000000 --- a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Fri Nov 10 17:11:35 HST 2006 -eclipse.preferences.version=1 -encoding/<project>=ISO-8859-1 diff --git a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 2920850ac..000000000 --- a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,77 +0,0 @@ -#Thu Sep 13 15:25:06 EDT 2007 -eclipse.preferences.version=1 -instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=error -org.eclipse.jdt.core.builder.invalidClasspath=ignore -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.testsuite,*.deploy,*.location,*.execution,*.datapool,*.artifact,*.html,*.svg -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.classpath.exclusionPatterns=disabled -org.eclipse.jdt.core.classpath.multipleOutputLocations=disabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=error -org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error -org.eclipse.jdt.core.compiler.problem.localVariableHiding=error -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -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=error -org.eclipse.jdt.core.compiler.problem.unusedLabel=error -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=error -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.incompatibleJDKLevel=warning -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index b91a054f8..000000000 --- a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Thu Aug 16 17:00:15 EDT 2007 -eclipse.preferences.version=1 -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\n<templates/> diff --git a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.pde.prefs deleted file mode 100644 index 08a60e5fc..000000000 --- a/plugins/org.eclipse.wst.server.preview/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,14 +0,0 @@ -#Sat Apr 22 18:36:14 EDT 2006 -compilers.incompatible-environment=0 -compilers.p.build=0 -compilers.p.deprecated=1 -compilers.p.no-required-att=0 -compilers.p.not-externalized-att=2 -compilers.p.unknown-attribute=0 -compilers.p.unknown-class=0 -compilers.p.unknown-element=0 -compilers.p.unknown-resource=0 -compilers.p.unresolved-ex-points=0 -compilers.p.unresolved-import=0 -compilers.use-project=true -eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF deleted file mode 100644 index e0f61a53d..000000000 --- a/plugins/org.eclipse.wst.server.preview/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.wst.server.preview; singleton:=true -Bundle-Version: 1.0.100.qualifier -Bundle-Activator: org.eclipse.wst.server.preview.internal.PreviewServerPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Export-Package: org.eclipse.wst.server.preview.internal -Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", - org.mortbay.jetty;bundle-version="[5.1.11,6.0.0)", - org.apache.commons.logging;bundle-version="[1.0.4,2.0.0)" -Eclipse-LazyStart: true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/plugins/org.eclipse.wst.server.preview/about.html b/plugins/org.eclipse.wst.server.preview/about.html deleted file mode 100644 index 73db36ed5..000000000 --- a/plugins/org.eclipse.wst.server.preview/about.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> - -<head> -<title>About</title> -<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> -</head> - -<BODY lang="EN-US"> - -<H3>About This Content</H3> - -<P>June 06, 2007</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/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</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> diff --git a/plugins/org.eclipse.wst.server.preview/build.properties b/plugins/org.eclipse.wst.server.preview/build.properties deleted file mode 100644 index 95793467f..000000000 --- a/plugins/org.eclipse.wst.server.preview/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -############################################################################### -# Copyright (c) 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 -############################################################################### -bin.includes = plugin.xml,\ - plugin.properties,\ - .,\ - META-INF/,\ - about.html -bin.excludes = bin/**,\ - @dot/**,\ - temp.folder/** -source.. = src/ diff --git a/plugins/org.eclipse.wst.server.preview/plugin.properties b/plugins/org.eclipse.wst.server.preview/plugin.properties deleted file mode 100644 index 46a080b37..000000000 --- a/plugins/org.eclipse.wst.server.preview/plugin.properties +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################### -# Copyright (c) 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 -############################################################################### -pluginName=Preview Server Support -providerName=Eclipse.org diff --git a/plugins/org.eclipse.wst.server.preview/plugin.xml b/plugins/org.eclipse.wst.server.preview/plugin.xml deleted file mode 100644 index a2e804ccc..000000000 --- a/plugins/org.eclipse.wst.server.preview/plugin.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> - -<plugin> - <extension id="preview" - point="org.eclipse.core.runtime.applications"> - <application visible="false"> - <run class="org.eclipse.wst.server.preview.internal.PreviewApplication"/> - </application> - </extension> -</plugin>
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/IMemento.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/IMemento.java deleted file mode 100644 index a0e8d8ea7..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/IMemento.java +++ /dev/null @@ -1,74 +0,0 @@ -/********************************************************************** - * Copyright (c) 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.wst.server.preview.internal; -/** - * Interface to a memento used for saving the important state of an object - * in a form that can be persisted in the file system. - * <p> - * Mementos were designed with the following requirements in mind: - * <ol> - * <li>Certain objects need to be saved and restored across platform sessions. - * </li> - * <li>When an object is restored, an appropriate class for an object might not - * be available. It must be possible to skip an object in this case.</li> - * <li>When an object is restored, the appropriate class for the object may be - * different from the one when the object was originally saved. If so, the - * new class should still be able to read the old form of the data.</li> - * </ol> - * </p> - * <p> - * Mementos meet these requirements by providing support for storing a - * mapping of arbitrary string keys to primitive values, and by allowing - * mementos to have other mementos as children (arranged into a tree). - * A robust external storage format based on XML is used. - * </p><p> - * The key for an attribute may be any alpha numeric value. However, the - * value of <code>TAG_ID</code> is reserved for internal use. - * </p><p> - * This interface is not intended to be implemented by clients. - * </p> - */ -public interface IMemento { - - /** - * Returns the first child with the given type id. - * - * @param type the type id - * @return the first child with the given type - */ - public IMemento getChild(String type); - - /** - * Returns all children with the given type id. - * - * @param type the type id - * @return the list of children with the given type - */ - public IMemento[] getChildren(String type); - - /** - * Returns the integer value of the given key. - * - * @param key the key - * @return the value, or <code>null</code> if the key was not found or was found - * but was not an integer - */ - public Integer getInteger(String key); - - /** - * Returns the string value of the given key. - * - * @param key the key - * @return the value, or <code>null</code> if the key was not found or was found - * but was not an integer - */ - public String getString(String key); -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Messages.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Messages.java deleted file mode 100644 index d0d3b8a5e..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Messages.java +++ /dev/null @@ -1,41 +0,0 @@ -/********************************************************************** - * Copyright (c) 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.wst.server.preview.internal; - -import org.eclipse.osgi.util.NLS; -/** - * Translated messages. - */ -public class Messages extends NLS { - public static String errorLocation; - public static String errorJRE; - public static String classpathContainerDescription; - public static String classpathContainer; - public static String classpathContainerUnbound; - - public static String copyingTask; - public static String deletingTask; - public static String errorCopyingFile; - public static String errorCreatingZipFile; - public static String errorDelete; - public static String errorRename; - public static String errorReading; - public static String updateClasspathContainers; - public static String errorNoRuntime; - public static String errorFacet; - public static String errorDeleting; - public static String errorNotADirectory; - public static String errorMkdir; - - static { - NLS.initializeMessages(PreviewServerPlugin.PLUGIN_ID + ".internal.Messages", Messages.class); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Messages.properties b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Messages.properties deleted file mode 100644 index 185c62195..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Messages.properties +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################### -# Copyright (c) 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 -############################################################################### - -classpathContainerDescription=Server Library -classpathContainer={0} [{1}] -classpathContainerUnbound={0} [{1}] (unbound) - -errorLocation=Invalid location. -errorJRE=Invalid JRE. - -copyingTask=Copying from {0} to {1} -deletingTask=Deleting {0} -errorCopyingFile=Error copying file {0}: {1} -errorCreatingZipFile=Error creating zip file {0}: {1} -errorDelete=Could not delete previous copy, which may be locked by another process. -errorRename=Could not replace with temp file {0}. -errorReading=Error reading file {0} -errorNoRuntime=Cannot verify facets because there is no runtime associated with the server. -errorFacet=Project facet {0} version {1} is not supported. -errorDeleting=Could not delete {0}. May be locked by another process. -errorNotADirectory=Could not delete {0} since it is not a directory. -errorMkdir=Could not create directory {0}. - -updateClasspathContainers=Updating classpath container for {0}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Module.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Module.java deleted file mode 100644 index a45784fa6..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Module.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.wst.server.preview.internal; -/** - * - */ -public class Module { - private String name; - private boolean isStatic; - private String context; - private String projectPath; - - public Module(String name, boolean isStatic, String context, String projectPath) { - this.name = name; - this.isStatic = isStatic; - this.context = context; - this.projectPath = projectPath; - } - - public String getName() { - return name; - } - - public boolean isStaticWeb() { - return isStatic; - } - - public String getContext() { - return context; - } - - public String getPath() { - return projectPath; - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewApplication.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewApplication.java deleted file mode 100644 index 2bfcf6cde..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewApplication.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.wst.server.preview.internal; - -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; - -public class PreviewApplication implements IApplication { - protected PreviewStarter starter; - - public Object start(IApplicationContext appContext) throws Exception { - starter = new PreviewStarter(null); - starter.run(); - return EXIT_OK; - } - - public void stop() { - starter.stop(); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewServerPlugin.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewServerPlugin.java deleted file mode 100644 index 5e9d2bdee..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewServerPlugin.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.wst.server.preview.internal; - -import org.eclipse.core.runtime.*; -import org.osgi.framework.BundleContext; -/** - * - */ -public class PreviewServerPlugin extends Plugin { - public static final String PLUGIN_ID = "org.eclipse.wst.server.preview"; - - // singleton instance of this class - private static PreviewServerPlugin singleton; - - protected BundleContext context; - - /** - * Create the JavaServerPlugin. - */ - public PreviewServerPlugin() { - super(); - singleton = this; - } - - /** - * Returns the singleton instance of this plugin. - * - * @return a singleton instance - */ - public static PreviewServerPlugin getInstance() { - return singleton; - } - - /** - * @see Plugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context2) throws Exception { - super.start(context2); - context = context2; - } - - /** - * @see Plugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context2) throws Exception { - super.stop(context2); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewStarter.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewStarter.java deleted file mode 100644 index ca2144e78..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/PreviewStarter.java +++ /dev/null @@ -1,152 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 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.wst.server.preview.internal; - -import java.io.File; -import java.util.logging.Filter; -import java.util.logging.LogRecord; -import java.util.logging.Logger; - -import org.mortbay.http.HttpContext; -import org.mortbay.http.handler.ResourceHandler; -import org.mortbay.jetty.*; -import org.mortbay.jetty.servlet.WebApplicationContext; - -public class PreviewStarter { - private static final String[] AVERTED_LOGS = new String[] { - "org.mortbay.util.Container", "org.mortbay.http.HttpServer", - "org.mortbay.util.Credential", "org.mortbay.http.SocketListener", - "org.mortbay.http.HttpServer", "org.mortbay.jetty.Server" - }; - - protected String configPath; - protected Server server; - - public PreviewStarter(String configPath) { - this.configPath = configPath; - } - - public static void main(String[] args) { - PreviewStarter app = new PreviewStarter(args[0]); - app.run(); - } - - protected void run() { - System.out.println("Starting preview server"); - System.out.println(); - try { - ServerConfig config = new ServerConfig(configPath); - System.out.println("Port " + config.getPort()); - Module[] m = config.getModules(); - int size = m.length; - if (size > 0) { - System.out.println("Modules:"); - for (Module mm : m) - System.out.println(" " + mm.getName()); - System.out.println(); - } - - for (String log : AVERTED_LOGS) { - Logger logger = Logger.getLogger(log); - logger.setFilter(new Filter() { - public boolean isLoggable(LogRecord record) { - //Trace.trace(Trace.FINEST, "Averted Jetty log: " + record.getMessage()); - //System.out.println("averted: " + record.getLoggerName() + ": " + record.getMessage()); - return false; - } - }); - } - - // helper code to find jetty loggers - /*Logger logger = Logger.getLogger("org.mortbay.http.HttpServer"); - logger.addHandler(new java.util.logging.Handler() { - public void close() throws SecurityException { - // ignore - } - - public void flush() { - // ignore - } - - public void publish(LogRecord record) { - System.out.println("Logger found: " + record.getLoggerName()); - } - });*/ - - server = new Server(); - server.addListener(":" + config.getPort()); - server.setTrace(false); - server.setStatsOn(false); - - HttpContext context2 = new HttpContext(); - context2.setContextPath("/"); - context2.addHandler(new WTPErrorPageHandler()); - context2.setAttribute(HttpContext.__ErrorHandler, new WTPErrorPageHandler()); - server.addContext(context2); - server.setRootWebApp("/"); - - for (Module module : m) { - if (module.isStaticWeb()) { - HttpContext context = new HttpContext(); - context.setContextPath(module.getContext()); - context.setResourceBase(module.getPath()); - context.addHandler(new ResourceHandler()); - context.addHandler(new WTPErrorPageHandler()); - context.setAttribute(HttpContext.__ErrorHandler, new WTPErrorPageHandler()); - server.addContext(context); - } else { - WebApplicationContext context = server.addWebApplication(module.getContext(), module.getPath()); - //context.getWebApplicationHandler(); - //context.addHandler(new WTPErrorPageHandler()); - context.setAttribute(HttpContext.__ErrorHandler, new WTPErrorPageHandler()); - } - } - - try { - server.start(); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - - public void stop() { - try { - System.out.println("Stop!"); - server.stop(); - //File contextWorkDir = new File(workDir, DIR_PREFIX + pid.hashCode()); - //deleteDirectory(contextWorkDir); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * deleteDirectory is a convenience method to recursively delete a directory - * @param directory - the directory to delete. - * @return was the delete succesful - */ - protected static boolean deleteDirectory(File directory) { - if (directory.exists() && directory.isDirectory()) { - File[] files = directory.listFiles(); - for (File file : files) { - if (file.isDirectory()) { - deleteDirectory(file); - } else { - file.delete(); - } - } - } - return directory.delete(); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/ServerConfig.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/ServerConfig.java deleted file mode 100644 index ea1cc4119..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/ServerConfig.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 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.wst.server.preview.internal; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -public class ServerConfig { - private String configPath; - private Module[] modules; - private int port = 8080; - - public ServerConfig(String configPath) { - this.configPath = configPath; - init(); - } - - private void init() { - File f = new File(configPath); - if (!f.exists()) - System.err.println("Config doesn't exist at " + configPath); - else { - try { - IMemento memento = XMLMemento.loadMemento(f); - Integer prt = memento.getInteger("port"); - if (prt != null) - port = prt.intValue(); - - IMemento[] modules2 = memento.getChildren("module"); - int size = modules2.length; - List<Module> list = new ArrayList<Module>(size); - for (IMemento mod : modules2) { - String name = mod.getString("name"); - boolean isStatic = "static".equals(mod.getString("type")); - String path = mod.getString("path"); - String context = mod.getString("context"); - Module module = new Module(name, isStatic, context, path); - list.add(module); - } - - modules = new Module[list.size()]; - list.toArray(modules); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - public int getPort() { - return port; - } - - public Module[] getModules() { - return modules; - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Trace.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Trace.java deleted file mode 100644 index 8a86d6496..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/Trace.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.wst.server.preview.internal; -/** - * Helper class to route trace output. - */ -public class Trace { - /** - * Config tracing - */ - public static final byte CONFIG = 0; - /** - * Warning tracing - */ - public static final byte WARNING = 1; - /** - * Severe tracing - */ - public static final byte SEVERE = 2; - /** - * Finest tracing - */ - public static final byte FINEST = 3; - - public static final byte PUBLISHING = 4; - - /** - * Trace constructor comment. - */ - private Trace() { - super(); - } - - /** - * Trace the given text. - * - * @param level trace level - * @param s String - */ - public static void trace(byte level, String s) { - Trace.trace(level, s, null); - } - - /** - * Trace the given message and exception. - * - * @param level trace level - * @param s String - * @param t Throwable - */ - public static void trace(byte level, String s, Throwable t) { - if (!PreviewServerPlugin.getInstance().isDebugging()) - return; - - System.out.println(PreviewServerPlugin.PLUGIN_ID + " " + s); - if (t != null) - t.printStackTrace(); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/WTPErrorPageHandler.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/WTPErrorPageHandler.java deleted file mode 100644 index e679edb5d..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/WTPErrorPageHandler.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.wst.server.preview.internal; - -import java.io.IOException; -import java.io.Writer; -import java.net.URLDecoder; - -import org.mortbay.http.HttpException; -import org.mortbay.http.HttpFields; -import org.mortbay.http.HttpRequest; -import org.mortbay.http.HttpResponse; -import org.mortbay.http.handler.AbstractHttpHandler; -import org.mortbay.util.ByteArrayISO8859Writer; -import org.mortbay.util.StringUtil; - -public class WTPErrorPageHandler extends AbstractHttpHandler { - private static final long serialVersionUID = 1L; - - public void handle(String pathInContext, String pathParams, HttpRequest request, - HttpResponse response) throws HttpException, IOException { - response.setContentType(HttpFields.__TextHtml); - ByteArrayISO8859Writer writer = new ByteArrayISO8859Writer(2048); - writeErrorPage(request, writer, response.getStatus(), response.getReason()); - - // workaround for IE, which overrides 404 errors to present its own page - if (response.getStatus() == 404) - response.setStatus(200, "OK"); - - writer.flush(); - response.setContentLength(writer.size()); - writer.writeTo(response.getOutputStream()); - writer.destroy(); - } - - protected void writeErrorPage(HttpRequest request, Writer writer, int code, - String message) throws IOException { - if (message != null) { - message = URLDecoder.decode(message, "UTF-8"); - message = StringUtil.replace(message, "<", "<"); - message = StringUtil.replace(message, ">", ">"); - } - String uri = request.getPath(); - uri = StringUtil.replace(uri, "<", "<"); - uri = StringUtil.replace(uri, ">", ">"); - writer.write("<html>\n<head>\n<title>Error "); - writer.write(Integer.toString(code)); - writer.write(' '); - writer.write(message); - writer.write("</title>\n</head>\n<body>\n<h2>HTTP ERROR: "); - writer.write(Integer.toString(code)); - writer.write("</h2><pre>"); - writer.write(message); - writer.write("</pre>\n"); - writer.write("<p>RequestURI="); - writer.write(uri); - writer.write("</p>"); - writer.write("\n</body>\n</html>\n"); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java b/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java deleted file mode 100644 index d43134f26..000000000 --- a/plugins/org.eclipse.wst.server.preview/src/org/eclipse/wst/server/preview/internal/XMLMemento.java +++ /dev/null @@ -1,175 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.wst.server.preview.internal; - -import java.io.*; -import java.util.*; - -import org.w3c.dom.*; -import org.xml.sax.*; - -import javax.xml.parsers.*; -/** - * A Memento is a class independent container for persistence - * info. It is a reflection of 3 storage requirements. - * - * 1) We need the ability to persist an object and restore it. - * 2) The class for an object may be absent. If so we would - * like to skip the object and keep reading. - * 3) The class for an object may change. If so the new class - * should be able to read the old persistence info. - * - * We could ask the objects to serialize themselves into an - * ObjectOutputStream, DataOutputStream, or Hashtable. However - * all of these approaches fail to meet the second requirement. - * - * Memento supports binary persistence with a version ID. - */ -public final class XMLMemento implements IMemento { - private Document factory; - private Element element; - - /** - * Answer a memento for the document and element. For simplicity - * you should use createReadRoot and createWriteRoot to create the initial - * mementos on a document. - */ - private XMLMemento(Document doc, Element el) { - factory = doc; - element = el; - } - - /** - * Create a Document from a Reader and answer a root memento for reading - * a document. - */ - private static XMLMemento createReadRoot(InputStream in) { - Document document = null; - try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder parser = factory.newDocumentBuilder(); - document = parser.parse(new InputSource(in)); - Node node = document.getFirstChild(); - if (node instanceof Element) - return new XMLMemento(document, (Element) node); - } catch (Exception e) { - // ignore - } finally { - try { - in.close(); - } catch (Exception e) { - // ignore - } - } - return null; - } - - /* - * @see IMemento - */ - public IMemento getChild(String type) { - // Get the nodes. - NodeList nodes = element.getChildNodes(); - int size = nodes.getLength(); - if (size == 0) - return null; - - // Find the first node which is a child of this node. - for (int nX = 0; nX < size; nX ++) { - Node node = nodes.item(nX); - if (node instanceof Element) { - Element element2 = (Element)node; - if (element2.getNodeName().equals(type)) - return new XMLMemento(factory, element2); - } - } - - // A child was not found. - return null; - } - - /* - * @see IMemento - */ - public IMemento [] getChildren(String type) { - // Get the nodes. - NodeList nodes = element.getChildNodes(); - int size = nodes.getLength(); - if (size == 0) - return new IMemento[0]; - - // Extract each node with given type. - List<Element> list = new ArrayList<Element>(size); - for (int nX = 0; nX < size; nX ++) { - Node node = nodes.item(nX); - if (node instanceof Element) { - Element element2 = (Element)node; - if (element2.getNodeName().equals(type)) - list.add(element2); - } - } - - // Create a memento for each node. - size = list.size(); - IMemento [] results = new IMemento[size]; - for (int x = 0; x < size; x ++) { - results[x] = new XMLMemento(factory, list.get(x)); - } - return results; - } - - /* - * @see IMemento - */ - public Integer getInteger(String key) { - Attr attr = element.getAttributeNode(key); - if (attr == null) - return null; - String strValue = attr.getValue(); - try { - return new Integer(strValue); - } catch (NumberFormatException e) { - return null; - } - } - - /* - * @see IMemento - */ - public String getString(String key) { - Attr attr = element.getAttributeNode(key); - if (attr == null) - return null; - return attr.getValue(); - } - - /** - * Loads a memento from the given file. - * - * @param file a file - * @exception java.io.IOException - * @return a memento - */ - public static IMemento loadMemento(File file) throws IOException { - InputStream in = null; - try { - in = new BufferedInputStream(new FileInputStream(file)); - return XMLMemento.createReadRoot(in); - } finally { - try { - if (in != null) - in.close(); - } catch (Exception e) { - // ignore - } - } - } -}
\ No newline at end of file |