Author: scabanovich
Date: 2007-10-12 05:39:52 -0400 (Fri, 12 Oct 2007)
New Revision: 4136
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebProjectPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
Log:
JBIDE-544
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebProjectPreferencesPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebProjectPreferencesPage.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebProjectPreferencesPage.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -60,8 +60,8 @@
}
public void initPageProperties() {
- defaultRoot = (IPropertyEditor)getSupport().getPropertyEditorByName("Use Default
Path"); /* "Use Default Path Under Tomcat" */
- selectRoot = (IPropertyEditor)getSupport().getPropertyEditorByName("Projects
Root"); /* "Projects Root" */
+ defaultRoot = (IPropertyEditor)getSupport().getPropertyEditorByName("Use Default
Path");
+ selectRoot = (IPropertyEditor)getSupport().getPropertyEditorByName("Projects
Root");
defaultRootValueProvider =
(IValueProvider)defaultRoot.getAdapter(IValueProvider.class);
defaultRootValueProvider.addValueChangeListener(new DefaultRootChangeListener());
versionAdapter.addValueChangeListener(
@@ -87,11 +87,7 @@
boolean auto = a.isAutoStore();
a.setAutoStore(false);
if(!active || oldRoot.length() == 0) oldRoot = a.getStringValue(true);
-/*
- String value = (active) ? oldRoot :
- (tomcatValueProvider != null) ? tomcatValueProvider.getValue() + "/webapp"
- : Preference.TOMCAT_ROOT_DIR.getValue() + "/webapp";
-*/
+
String value = (active) ? oldRoot :
ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
a.setValue(value);
a.setAutoStore(auto);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -73,7 +73,7 @@
import org.jboss.tools.common.model.project.WatcherLoader;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.jst.web.WebModelPlugin;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
import org.jboss.tools.jst.web.server.RegistrationHelper;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
@@ -126,7 +126,7 @@
private HashMap propertyValue = new HashMap();
private HashMap wizardPropertiesForVelocity = new HashMap();
private Properties wizardPropertiesAsIs;
- RegisterTomcatContext registry;
+ RegisterServerContext registry;
boolean isCancelled = false;
@@ -137,7 +137,7 @@
* @param registry
* @param properties
*/
- public WebNatureOperation(IProject project, IPath projectLocation, RegisterTomcatContext
registry, Properties properties) {
+ public WebNatureOperation(IProject project, IPath projectLocation, RegisterServerContext
registry, Properties properties) {
initDefaults();
setProject(project);
setProperty(PROJECT_NAME_ID, project.getName());
@@ -203,7 +203,7 @@
* @param context
*/
public WebNatureOperation(NewWebProjectContext context) {
- this(context.getProject(), context.getLocationPath(),
context.getRegisterTomcatContext(), context.getActionProperties());
+ this(context.getProject(), context.getLocationPath(),
context.getRegisterServerContext(), context.getActionProperties());
}
/**
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -39,7 +39,7 @@
protected IImportWebProjectContext context;
public WebProjectAdoptOperation(IImportWebProjectContext context) {
- super(context.getProjectHandle(), new Path(context.getSuggestedProjectLocation()),
context.getRegisterTomcatContext(), new Properties());
+ super(context.getProjectHandle(), new Path(context.getSuggestedProjectLocation()),
context.getRegisterServerContext(), new Properties());
setProperty(WebNatureOperation.ANT_BUILD_XML_ID,
context.getBuildXmlLocation().replace('\\', '/'));
setProperty(WebNatureOperation.JAVA_CLASSES_LOCATION_ID,
context.getClassesLocation().replace('\\', '/'));
setProperty(WebNatureOperation.JAVA_SOURCES_LOCATION_ID, context.getJavaSources());
@@ -51,7 +51,7 @@
setProperty(WebNatureOperation.WEB_INF_LOCATION_ID,
context.getWebInfLocation().replace('\\', '/'));
setProperty(WebNatureOperation.WEB_CONTENT_LOCATION_ID,
context.getWebRootPath().replace('\\', '/'));
setProperty(WebNatureOperation.WEB_XML_LOCATION_ID,
context.getWebXmlLocation().replace('\\', '/'));
- setProperty(WebNatureOperation.RUNTIME_NAME,
context.getRegisterTomcatContext().getRuntimeName());
+ setProperty(WebNatureOperation.RUNTIME_NAME,
context.getRegisterServerContext().getRuntimeName());
this.context = (ImportWebProjectContext)context;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -35,7 +35,7 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.jst.web.project.helpers.IWebProjectTemplate;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
@@ -45,12 +45,12 @@
protected IWebProjectTemplate template = createTemplate();
protected XModel templateModel = null;
- public WebProjectCreationOperation(IProject project, IPath projectLocation,
RegisterTomcatContext registry, Properties properties) {
+ public WebProjectCreationOperation(IProject project, IPath projectLocation,
RegisterServerContext registry, Properties properties) {
super(project, projectLocation, registry, properties);
}
public WebProjectCreationOperation(NewWebProjectContext context) {
- this(context.getProject(), context.getLocationPath(),
context.getRegisterTomcatContext(), context.getActionProperties());
+ this(context.getProject(), context.getLocationPath(),
context.getRegisterServerContext(), context.getActionProperties());
setProperty(WebNatureOperation.PROJECT_NAME_ID,
context.getActionProperties().getProperty(NewWebProjectContext.ATTR_NAME));
setProperty(WebNatureOperation.PROJECT_LOCATION_ID,
context.getActionProperties().getProperty(NewWebProjectContext.ATTR_LOCATION));
setProperty(WebNatureOperation.USE_DEFAULT_LOCATION_ID,
context.getActionProperties().getProperty(NewWebProjectContext.ATTR_USE_DEFAULT_LOCATION));
@@ -58,7 +58,7 @@
setProperty(WebNatureOperation.TEMPLATE_VERSION_ID,
context.getActionProperties().getProperty(NewWebProjectContext.ATTR_VERSION));
setProperty(WebNatureOperation.SERVLET_VERSION_ID,
context.getActionProperties().getProperty(NewWebProjectContext.ATTR_SERVLET_VERSION));
setProperty(WebNatureOperation.REGISTER_WEB_CONTEXT_ID,
context.getActionProperties().getProperty(NewWebProjectContext.ATTR_REGISTER_WEB_CONTEXT));
- setProperty(WebNatureOperation.RUNTIME_NAME,
context.getRegisterTomcatContext().getRuntimeName());
+ setProperty(WebNatureOperation.RUNTIME_NAME,
context.getRegisterServerContext().getRuntimeName());
setProperty(WebNatureOperation.JAVA_SOURCES_LOCATION_ID, getJavaSources());
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -39,7 +39,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.util.XModelObjectUtil;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.server.*;
public class AppRegisterComponent {
@@ -51,7 +51,7 @@
static String ATTR_TARGET_SERVER = "target server";
static String ATTR_SEPARATOR = "separator";
- RegisterTomcatContext context;
+ RegisterServerContext context;
boolean isEnabling = true;
XAttributeSupport enableSupport;
private IModelPropertyEditorAdapter enableAdapter;
@@ -82,7 +82,7 @@
isEnabling = b;
}
- public void setContext(RegisterTomcatContext context) {
+ public void setContext(RegisterServerContext context) {
this.context = context;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -23,14 +23,14 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
import org.jboss.tools.common.model.ui.*;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.server.RegistrationHelper;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
public class AppRegisterWizard extends Wizard implements SpecialWizard {
Properties p;
XModelObject object;
- RegisterTomcatContext registry;
+ RegisterServerContext registry;
AppRegisterWizardPage page;
public AppRegisterWizard() {
@@ -65,7 +65,7 @@
public void setObject(Object object) {
p = (Properties)object;
- registry = new RegisterTomcatContext(RegisterTomcatContext.PROJECT_MODE_EXISTING);
+ registry = new RegisterServerContext(RegisterServerContext.PROJECT_MODE_EXISTING);
this.object = (XModelObject)p.get("object");
registry.setProjectHandle(EclipseResourceUtil.getProject(this.object));
registry.init();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizardPage.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizardPage.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -14,13 +14,13 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
public class AppRegisterWizardPage extends WizardPage {
- protected RegisterTomcatContext context;
+ protected RegisterServerContext context;
AppRegisterComponent appRegister = new AppRegisterComponent();
- public AppRegisterWizardPage(RegisterTomcatContext context) {
+ public AppRegisterWizardPage(RegisterServerContext context) {
super("Red Hat Project");
this.context = context;
appRegister.setContext(context);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -37,7 +37,7 @@
this.context = context;
this.servletPreference = servletPreference;
initServletSupport();
- appRegister.setContext(context.getRegisterTomcatContext());
+ appRegister.setContext(context.getRegisterServerContext());
//For new WTP
appRegister.setEnabling(false);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -64,7 +64,7 @@
nameLocationAdapter = support.getPropertyEditorAdapterByName("name");
useDefaultPathAdapter = support.getPropertyEditorAdapterByName("use default
path");
projectLocationAdapter = support.getPropertyEditorAdapterByName("location");
- appRegister.setContext(context.getRegisterTomcatContext());
+ appRegister.setContext(context.getRegisterServerContext());
appRegister.setEnabling(false);
appRegister.init();
initListeners();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2007-10-12
09:39:33 UTC (rev 4135)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2007-10-12
09:39:52 UTC (rev 4136)
@@ -48,7 +48,7 @@
}
public boolean canFinish() {
- return super.canFinish() &&
context.getRegisterTomcatContext().getErrorMessage() == null;
+ return super.canFinish() &&
context.getRegisterServerContext().getErrorMessage() == null;
}
public void setInitializationData(IConfigurationElement cfig, String propertyName,
Object data) {