Author: scabanovich
Date: 2007-10-12 05:40:19 -0400 (Fri, 12 Oct 2007)
New Revision: 4138
Added:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties
Removed:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.properties
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebPreference.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/IImportWebProjectContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
Log:
JBIDE-544
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebPreference.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebPreference.java 2007-10-12
09:40:03 UTC (rev 4137)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebPreference.java 2007-10-12
09:40:19 UTC (rev 4138)
@@ -32,7 +32,7 @@
public static final WebPreference SERVER_JVM = new
WebPreference(OPTIONS_RUNNING_PATH, "JVM");
public static final WebPreference SERVER_WARNING = new
WebPreference(OPTIONS_RUNNING_PATH, "show_warning");
- public static String ATTR_REGISTER_IN_TOMCAT = "Register Web Context in
server.xml";
+ public static String ATTR_REGISTER_IN_SERVER = "Register Web Context in
server.xml";
public static final WebPreference DEFAULT_SERVLET_VERSION = new
WebPreference(OPTIONS_NEW_PROJECT_PATH, "Servlet Version");
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/IImportWebProjectContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/IImportWebProjectContext.java 2007-10-12
09:40:03 UTC (rev 4137)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/IImportWebProjectContext.java 2007-10-12
09:40:19 UTC (rev 4138)
@@ -32,7 +32,7 @@
public String getServletVersion();
public String getTemplateVersion();
public String getSuggestedProjectLocation();
- public RegisterTomcatContext getRegisterTomcatContext();
+ public RegisterServerContext getRegisterServerContext();
public String SERVLET_VERSION_WARNING = WebUIMessages.SERVLET_VERSION_WARNING;
public boolean isServletVersionConsistentToWebXML();
public void convertWebXML(boolean backup);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java 2007-10-12
09:40:03 UTC (rev 4137)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java 2007-10-12
09:40:19 UTC (rev 4138)
@@ -40,7 +40,7 @@
protected XModelObject[] modules = new XModelObject[0];
protected XModelObject[] allmodules = new XModelObject[0];
protected String[] existingSources = new String[0];
- RegisterTomcatContext registry = new
RegisterTomcatContext(RegisterTomcatContext.PROJECT_MODE_IMPORT);
+ RegisterServerContext registry = new
RegisterServerContext(RegisterServerContext.PROJECT_MODE_IMPORT);
protected boolean addLibraries = false;
protected String servletVersion = null;
protected String templateVersion = null;
@@ -55,7 +55,7 @@
return target;
}
- public RegisterTomcatContext getRegisterTomcatContext() {
+ public RegisterServerContext getRegisterServerContext() {
return registry;
}
Copied:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
(from rev 3566,
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.java)
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2007-10-12
09:40:19 UTC (rev 4138)
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.context;
+
+import java.util.ResourceBundle;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.internal.*;
+
+import org.jboss.tools.common.model.options.Preference;
+import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
+import org.jboss.tools.jst.web.server.RegistrationHelper;
+import org.jboss.tools.jst.web.server.ServerManager;
+
+public class RegisterServerContext {
+ public static int PROJECT_MODE_NEW = 0;
+ public static int PROJECT_MODE_IMPORT = 1;
+ public static int PROJECT_MODE_EXISTING = 2;
+
+ static String HELP_KEY_BASE = "FileSystems_RegisterInServerXML";
//$NON-NLS-1$
+
+ static final private String ERR_APP_NAME_IS_NOT_SPECIFIED =
"ERR_APP_NAME_IS_NOT_SPECIFIED"; //$NON-NLS-1$
+ static final private String ERR_SERVLET_VERSION_IS_NOT_SET =
"ERR_SERVLET_VERSION_IS_NOT_SET"; //$NON-NLS-1$
+ static final private String ERR_SERVLET_VERSION_IS_NOT_VALID =
"ERR_SERVLET_VERSION_IS_NOT_VALID"; //$NON-NLS-1$
+
+ IProject project = null;
+ String servletVersion = ""; //$NON-NLS-1$
+
+ static final private ResourceBundle MESSAGES =
ResourceBundle.getBundle(RegisterServerContext.class.getName());
+
+ int mode;
+ boolean isEnabled = false;
+ boolean isInitiallyEnabled = false;
+ String location = null;
+ String applicationName = null;
+ String natureIndex = null;
+ Preference registerProjectPreference;
+
+ IRuntime runtime = null;
+ String runtimeName = ""; //$NON-NLS-1$
+ IServer[] targetServers = new IServer[0];
+
+ long xmlTimeStamp = -1;
+ String xmlError = null;
+
+ private static final String YES_STRING = "yes"; //$NON-NLS-1$
+ private static final String EMPTY_LOCATION = ""; //$NON-NLS-1$
+
+
+ public RegisterServerContext(int mode) {
+ this.mode = mode;
+ init();
+ }
+
+ public void setServletVersion(String v) {
+ servletVersion = v;
+ }
+
+ public void setProjectHandle(IProject p) {
+ project = p;
+ }
+
+ public void setPreferences(Preference registerProjectPreference) {
+ this.registerProjectPreference = registerProjectPreference;
+ }
+
+ public void setNatureIndex(String n) {
+ this.natureIndex = n;
+ }
+
+ public void setRuntimeName(String runtimeName) {
+ if(this.runtimeName.equals(runtime)) return;
+ this.runtimeName = runtimeName;
+ IRuntime[] rs = ServerCore.getRuntimes();
+ for (int i = 0; i < rs.length; i++) {
+ if(rs[i].getName().equals(runtimeName)) {
+ runtime = rs[i];
+ return;
+ }
+ }
+ runtime = null;
+ }
+
+ public String getRuntimeName() {
+ return runtimeName;
+ }
+
+ public void setTargetServers(IServer[] info) {
+ targetServers = info;
+ }
+
+ public IServer[] getTargetServers() {
+ return targetServers;
+ }
+
+ public void setEnabled(boolean b) {
+ isEnabled = (mode == PROJECT_MODE_EXISTING) || b;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public void setApplicationName(String name) {
+ applicationName = name;
+ }
+
+ public boolean isEnabled() {
+ return isEnabled;
+ }
+
+ public boolean isInitiallyEnabled() {
+ return isInitiallyEnabled;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getApplicationName() {
+ return applicationName;
+ }
+
+ public String getErrorMessage() {
+ if(runtimeName == null || runtimeName.length() == 0) return
WebUIMessages.RUNTIME_IS_REQUIRED;
+ if(runtime == null) return WebUIMessages.SPECIFIED_RUNTIME_DOESNOT_EXIST;
+
+ if(!isEnabled()) {
+ if(servletVersion != null && servletVersion.length() == 0) {
+ return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_SET);
+ }
+ return null;
+ }
+
+ if(applicationName == null || applicationName.length() == 0) {
+ return MESSAGES.getString(ERR_APP_NAME_IS_NOT_SPECIFIED);
+ }
+
+ if(true) {
+ String contextRootError = RegistrationHelper.checkContextRoot(applicationName);
+ if(contextRootError != null) return contextRootError;
+ for (int i = 0; i < targetServers.length; i++) {
+ if(RegistrationHelper.isRegistered(applicationName, targetServers[i])) {
+ return NLS.bind(WebUIMessages.APPLICATION_IS_ALREADY_REGISTERED, applicationName,
targetServers[i].getName()); //$NON-NLS-2$
+ }
+ if(this.project != null /*&& !this.project.exists()*/ &&
servletVersion != null && servletVersion.length() > 0) {
+ if(project.exists() && RegistrationHelper.isRegistered(project)) {
+ return "Project " + project.getName() + " is already
registered.";
+ }
+ ModuleFactory f =
ServerPlugin.findModuleFactory("org.eclipse.jst.j2ee.server"); //$NON-NLS-1$
+ IModule module = RegistrationHelper.findModule(project);
+ if(module == null) {
+ module = (f == null) ? null : new Module(f, project.getName(), project.getName(),
"jst.web", servletVersion, null); //$NON-NLS-1$
+ }
+ String m = (module == null) ? null : RegistrationHelper.getRegistrationError(module,
applicationName, targetServers[i]);
+ if(m != null) return m;
+ }
+ }
+ if(servletVersion != null && servletVersion.length() == 0) {
+ return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_SET);
+ } else if(!checkServletVersionFormat()) {
+ return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_VALID);
+ }
+ return null;
+ }
+
+ return xmlError;
+ }
+
+ boolean checkServletVersionFormat() {
+ if(servletVersion == null || servletVersion.length() == 0) return true;
+ StringTokenizer st = new StringTokenizer(servletVersion, ".");
+ if(st.countTokens() < 2 || st.countTokens() > 3) return false;
+ while(st.hasMoreTokens()) {
+ String t = st.nextToken().trim();
+ try {
+ Integer.parseInt(t);
+ } catch (Exception e) {
+ return false;
+ }
+ }
+ return true;
+
+ }
+
+ public void init() {
+ isEnabled = (registerProjectPreference == null)
+ || YES_STRING.equals(registerProjectPreference.getValue());
+ isInitiallyEnabled = isEnabled;
+ applicationName = null;
+
+ IServer server = ServerManager.getInstance().getSelectedServer();
+ if(server == null || server.getRuntime() == null) {
+ location = EMPTY_LOCATION;
+ } else {
+ location = server.getRuntime().getLocation().toString();
+ }
+ }
+
+ public int getMode() {
+ return mode;
+ }
+
+ public IRuntime getRuntime() {
+ return runtime;
+ }
+
+ public String getHelpBase() {
+ return (natureIndex == null) ? HELP_KEY_BASE : HELP_KEY_BASE + "_" +
natureIndex; //$NON-NLS-1$
+ }
+
+}
Copied:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties
(from rev 3566,
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.properties)
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties 2007-10-12
09:40:19 UTC (rev 4138)
@@ -0,0 +1,8 @@
+ERR_SERVER_IS_NOT_CONFIGURED=Selected server is not configured
+ERR_APP_NAME_IS_NOT_SPECIFIED=Application Name is not specified.
+ERR_LOCATION_IS_NOT_SPECIFIED={0} location is not specified. Set correct path to {1}
Root Dir in preferences.
+ERR_SPECIFIED_FILE_DOES_NOT_EXIST=Specified " + where + " file does not exist.
+ERR_FILE_IS_CORRUPTED={0} is corrupted {1}.
+ERR_TARGET_SERVER=Set correct target server.
+ERR_SERVLET_VERSION_IS_NOT_SET=Servlet version is not specified.
+ERR_SERVLET_VERSION_IS_NOT_VALID=Servlet version is not valid.
Deleted:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.java 2007-10-12
09:40:03 UTC (rev 4137)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.java 2007-10-12
09:40:19 UTC (rev 4138)
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.context;
-
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.internal.*;
-
-import org.jboss.tools.common.model.options.Preference;
-import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
-import org.jboss.tools.jst.web.server.RegistrationHelper;
-import org.jboss.tools.jst.web.server.ServerManager;
-
-public class RegisterTomcatContext {
- public static int PROJECT_MODE_NEW = 0;
- public static int PROJECT_MODE_IMPORT = 1;
- public static int PROJECT_MODE_EXISTING = 2;
-
- static String HELP_KEY_BASE = "FileSystems_RegisterInServerXML";
//$NON-NLS-1$
-
- static final private String ERR_APP_NAME_IS_NOT_SPECIFIED =
"ERR_APP_NAME_IS_NOT_SPECIFIED"; //$NON-NLS-1$
- static final private String ERR_SERVLET_VERSION_IS_NOT_SET =
"ERR_SERVLET_VERSION_IS_NOT_SET"; //$NON-NLS-1$
- static final private String ERR_SERVLET_VERSION_IS_NOT_VALID =
"ERR_SERVLET_VERSION_IS_NOT_VALID"; //$NON-NLS-1$
-
- IProject project = null;
- String servletVersion = ""; //$NON-NLS-1$
-
- static final private ResourceBundle MESSAGES =
ResourceBundle.getBundle(RegisterTomcatContext.class.getName());
-
- int mode;
- boolean isEnabled = false;
- boolean isInitiallyEnabled = false;
- String location = null;
- String applicationName = null;
- String natureIndex = null;
- Preference registerProjectPreference;
-
- IRuntime runtime = null;
- String runtimeName = ""; //$NON-NLS-1$
- IServer[] targetServers = new IServer[0];
-
- long xmlTimeStamp = -1;
- String xmlError = null;
-
- private static final String YES_STRING = "yes"; //$NON-NLS-1$
- private static final String EMPTY_LOCATION = ""; //$NON-NLS-1$
-
-
- public RegisterTomcatContext(int mode) {
- this.mode = mode;
- init();
- }
-
- public void setServletVersion(String v) {
- servletVersion = v;
- }
-
- public void setProjectHandle(IProject p) {
- project = p;
- }
-
- public void setPreferences(Preference registerProjectPreference) {
- this.registerProjectPreference = registerProjectPreference;
- }
-
- public void setNatureIndex(String n) {
- this.natureIndex = n;
- }
-
- public void setRuntimeName(String runtimeName) {
- if(this.runtimeName.equals(runtime)) return;
- this.runtimeName = runtimeName;
- IRuntime[] rs = ServerCore.getRuntimes();
- for (int i = 0; i < rs.length; i++) {
- if(rs[i].getName().equals(runtimeName)) {
- runtime = rs[i];
- return;
- }
- }
- runtime = null;
- }
-
- public String getRuntimeName() {
- return runtimeName;
- }
-
- public void setTargetServers(IServer[] info) {
- targetServers = info;
- }
-
- public IServer[] getTargetServers() {
- return targetServers;
- }
-
- public void setEnabled(boolean b) {
- isEnabled = (mode == PROJECT_MODE_EXISTING) || b;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public void setApplicationName(String name) {
- applicationName = name;
- }
-
- public boolean isEnabled() {
- return isEnabled;
- }
-
- public boolean isInitiallyEnabled() {
- return isInitiallyEnabled;
- }
-
- public String getLocation() {
- return location;
- }
-
- public String getApplicationName() {
- return applicationName;
- }
-
- public String getErrorMessage() {
- if(runtimeName == null || runtimeName.length() == 0) return
WebUIMessages.RUNTIME_IS_REQUIRED;
- if(runtime == null) return WebUIMessages.SPECIFIED_RUNTIME_DOESNOT_EXIST;
-
- if(!isEnabled()) {
- if(servletVersion != null && servletVersion.length() == 0) {
- return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_SET);
- }
- return null;
- }
-
- if(applicationName == null || applicationName.length() == 0) {
- return MESSAGES.getString(ERR_APP_NAME_IS_NOT_SPECIFIED);
- }
-
- if(true) {
- String contextRootError = RegistrationHelper.checkContextRoot(applicationName);
- if(contextRootError != null) return contextRootError;
- for (int i = 0; i < targetServers.length; i++) {
- if(RegistrationHelper.isRegistered(applicationName, targetServers[i])) {
- return NLS.bind(WebUIMessages.APPLICATION_IS_ALREADY_REGISTERED, applicationName,
targetServers[i].getName()); //$NON-NLS-2$
- }
- if(this.project != null /*&& !this.project.exists()*/ &&
servletVersion != null && servletVersion.length() > 0) {
- if(project.exists() && RegistrationHelper.isRegistered(project)) {
- return "Project " + project.getName() + " is already
registered.";
- }
- ModuleFactory f =
ServerPlugin.findModuleFactory("org.eclipse.jst.j2ee.server"); //$NON-NLS-1$
- IModule module = RegistrationHelper.findModule(project);
- if(module == null) {
- module = (f == null) ? null : new Module(f, project.getName(), project.getName(),
"jst.web", servletVersion, null); //$NON-NLS-1$
- }
- String m = (module == null) ? null : RegistrationHelper.getRegistrationError(module,
applicationName, targetServers[i]);
- if(m != null) return m;
- }
- }
- if(servletVersion != null && servletVersion.length() == 0) {
- return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_SET);
- } else if(!checkServletVersionFormat()) {
- return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_VALID);
- }
- return null;
- }
-
- return xmlError;
- }
-
- boolean checkServletVersionFormat() {
- if(servletVersion == null || servletVersion.length() == 0) return true;
- StringTokenizer st = new StringTokenizer(servletVersion, ".");
- if(st.countTokens() < 2 || st.countTokens() > 3) return false;
- while(st.hasMoreTokens()) {
- String t = st.nextToken().trim();
- try {
- Integer.parseInt(t);
- } catch (Exception e) {
- return false;
- }
- }
- return true;
-
- }
-
- public void init() {
- isEnabled = (registerProjectPreference == null)
- || YES_STRING.equals(registerProjectPreference.getValue());
- isInitiallyEnabled = isEnabled;
- applicationName = null;
-
- IServer server = ServerManager.getInstance().getSelectedServer();
- if(server == null || server.getRuntime() == null) {
- location = EMPTY_LOCATION;
- } else {
- location = server.getRuntime().getLocation().toString();
- }
- }
-
- public int getMode() {
- return mode;
- }
-
- public IRuntime getRuntime() {
- return runtime;
- }
-
- public String getHelpBase() {
- return (natureIndex == null) ? HELP_KEY_BASE : HELP_KEY_BASE + "_" +
natureIndex; //$NON-NLS-1$
- }
-
-}
Deleted:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.properties
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.properties 2007-10-12
09:40:03 UTC (rev 4137)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterTomcatContext.properties 2007-10-12
09:40:19 UTC (rev 4138)
@@ -1,8 +0,0 @@
-ERR_SERVER_IS_NOT_CONFIGURED=Selected server is not configured
-ERR_APP_NAME_IS_NOT_SPECIFIED=Application Name is not specified.
-ERR_LOCATION_IS_NOT_SPECIFIED={0} location is not specified. Set correct path to {1}
Root Dir in preferences.
-ERR_SPECIFIED_FILE_DOES_NOT_EXIST=Specified " + where + " file does not exist.
-ERR_FILE_IS_CORRUPTED={0} is corrupted {1}.
-ERR_TARGET_SERVER=Set correct target server.
-ERR_SERVLET_VERSION_IS_NOT_SET=Servlet version is not specified.
-ERR_SERVLET_VERSION_IS_NOT_VALID=Servlet version is not valid.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2007-10-12
09:40:03 UTC (rev 4137)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2007-10-12
09:40:19 UTC (rev 4138)
@@ -13,7 +13,7 @@
import java.util.*;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.*;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
public abstract class NewWebProjectContext {
public static final String ATTR_NAME = "name";
@@ -35,10 +35,10 @@
protected String servletVersion;
protected String projectTemplate;
- protected RegisterTomcatContext registry;
+ protected RegisterServerContext registry;
public NewWebProjectContext() {
- registry = new RegisterTomcatContext(RegisterTomcatContext.PROJECT_MODE_NEW);
+ registry = new RegisterServerContext(RegisterServerContext.PROJECT_MODE_NEW);
initRegistry();
}
@@ -95,7 +95,7 @@
registry.setServletVersion(value);
}
- public RegisterTomcatContext getRegisterTomcatContext() {
+ public RegisterServerContext getRegisterServerContext() {
return registry;
}