JBoss Tools SVN: r4143 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 06:03:37 -0400 (Fri, 12 Oct 2007)
New Revision: 4143
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
Log:
JBIDE-535
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:48:06 UTC (rev 4142)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2007-10-12 10:03:37 UTC (rev 4143)
@@ -15,11 +15,18 @@
import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.wizard.*;
import org.jboss.tools.common.meta.action.SpecialWizard;
import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.FileSystemImpl;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
import org.jboss.tools.common.model.ui.*;
@@ -38,24 +45,65 @@
}
public boolean performFinish() {
- try {
- IProject p = EclipseResourceUtil.getProject(object);
- String contextRoot = registry.getApplicationName();
- if(!contextRoot.equals(ComponentUtilities.getServerContextRoot(p))) {
- ComponentUtilities.setServerContextRoot(p, contextRoot);
+ Job job = new RegisterServerJob();
+ job.schedule(100);
+ return true;
+ }
+
+ class RegisterServerJob extends Job {
+
+ public RegisterServerJob() {
+ super("Register in Server");
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ModelPlugin.getWorkspace().run(new WR(), monitor);
+ } catch (Exception e) {
+ WebUiPlugin.getPluginLog().logError(e);
}
- IServer[] is = registry.getTargetServers();
- for (int i = 0; i < is.length; i++) {
- RegistrationHelper.register(p, is[i]);
+ return Status.OK_STATUS;
+ }
+ }
+
+ class WR implements IWorkspaceRunnable {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ try {
+ register(monitor);
+ } catch (Exception e) {
+ WebUiPlugin.getPluginLog().logError(e);
}
- object.getModel().changeObjectAttribute(object, "application name", registry.getApplicationName());
- } catch (Exception ex) {
- ProblemReportingHelper.reportProblem(WebUiPlugin.PLUGIN_ID, "Exception caught in AppRegisterWizard.performFinish(): " + ex.getMessage(), ex);
- return false;
- }
- return true;
+ }
+
}
+ private void register(IProgressMonitor monitor) throws Exception {
+ if(monitor != null) monitor.beginTask("", 100);
+ if(monitor != null) monitor.worked(5);
+
+ IServer[] servers = registry.getTargetServers();
+ int step = 70;
+ if(monitor != null) {
+ monitor.worked(5);
+ step = step / (2 * servers.length + 1);
+ }
+ IProject p = EclipseResourceUtil.getProject(object);
+ String contextRoot = registry.getApplicationName();
+ if(!contextRoot.equals(ComponentUtilities.getServerContextRoot(p))) {
+ ComponentUtilities.setServerContextRoot(p, contextRoot);
+ }
+ for (int i = 0; i < servers.length; i++) {
+ if(monitor != null) {
+ monitor.worked(step);
+ monitor.subTask(servers[i].getName());
+ }
+ RegistrationHelper.register(p, servers[i]);
+ if(monitor != null) monitor.worked(step);
+ }
+ object.getModel().changeObjectAttribute(object, "application name", registry.getApplicationName());
+ if(monitor != null) monitor.worked(20);
+ }
+
public String getWebRootLocation() {
XModelObject fs = object.getModel().getByPath("FileSystems/WEB-ROOT");
///if(fs == null) fs = getRootFileSystemForModule(model, "");
17 years, 3 months
JBoss Tools SVN: r4142 - trunk/jst/plugins/org.jboss.tools.jst.web.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 05:48:06 -0400 (Fri, 12 Oct 2007)
New Revision: 4142
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
JBIDE-544
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties 2007-10-12 09:47:40 UTC (rev 4141)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties 2007-10-12 09:48:06 UTC (rev 4142)
@@ -4,16 +4,6 @@
actionSets.modelActions.description=Description For JBoss Tools Model Actions
actionSets.projectActions.saveModel.label=Save Model
-actionSets.tomcatActions.selectServer.label=JBoss Tools Server Actions
-actionSets.tomcatActions.label=JBoss Tools Tomcat Actions
-actionSets.tomcatActions.description=Description for JBoss Tools Tomcat Actions
-actionSets.tomcatActions.changeWebXmlTimeStamp.label=Change web.xml Time Stamp
-actionSets.tomcatActions.restartTomcatServer.label=Restart Tomcat Server
-actionSets.tomcatActions.stopTomcatServer.label=Stop Tomcat Server
-actionSets.tomcatActions.debugTomcatServer.label=Start Tomcat Server in Debug Mode
-actionSets.tomcatActions.startTomcatServer.label=Start Tomcat Server
-actionSets.tomcatActions.runApplicationFromSelectedElement.label=Run Application from Selected Element
-
actionSets.serverActions.selectServer.label=Red Hat WTP Server Actions
actionSets.serverActions.label=Red Hat WTP Server Actions
actionSets.serverActions.description=Description for Red Hat WTP Server Actions
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-12 09:47:40 UTC (rev 4141)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-12 09:48:06 UTC (rev 4142)
@@ -89,7 +89,7 @@
</extension>
<extension point="org.eclipse.ui.actionSets">
<actionSet description="%actionSets.modelActions.description" id="com.redhat.studio.actionSet" label="%actionSets.modelActions.label" visible="true">
- <action class="org.jboss.tools.jst.web.ui.action.RunPageActionDelegate" icon="images/xstudio/actions/run_project.gif" id="org.jboss.tools.jst.web.ui.action.RunPageActionDelegate" label="%actionSets.tomcatActions.runApplicationFromSelectedElement.label" style="pulldown" toolbarPath="Normal/SSRun" tooltip="%actionSets.tomcatActions.runApplicationFromSelectedElement.label">
+ <action class="org.jboss.tools.jst.web.ui.action.RunPageActionDelegate" icon="images/xstudio/actions/run_project.gif" id="org.jboss.tools.jst.web.ui.action.RunPageActionDelegate" label="%actionSets.serverActions.runApplicationFromSelectedElement.label" style="pulldown" toolbarPath="Normal/SSRun" tooltip="%actionSets.serverActions.runApplicationFromSelectedElement.label">
</action>
</actionSet>
</extension>
17 years, 3 months
JBoss Tools SVN: r4141 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-12 05:47:40 -0400 (Fri, 12 Oct 2007)
New Revision: 4141
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create templates for <rich:panelMenu/>, <rich:panelMenuGroup/> and <rich:panelMenuItem> components.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12 09:43:38 UTC (rev 4140)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12 09:47:40 UTC (rev 4141)
@@ -47,7 +47,6 @@
// private static final String PATH_TO_COLLAPSED_GROUP =
// "/panelMenuGroup/collapsed.gif";
- @SuppressWarnings("unchecked")
private static Map toggleMap = new HashMap();
// private boolean collapsedFalg = false;
@@ -83,8 +82,6 @@
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
}
- //VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
- // vpeCreationData.addChildrenInfo(childrenInfo);
List<Node> children = ComponentUtil.getChildren(sourceElement);
int activeId = getActiveId(sourceElement, children);
int i = 0;
@@ -97,19 +94,20 @@
RichFacesPanelMenuGroupTemplate.encode(pageContext,
vpeCreationData, (Element) child, visualDocument, div,
active);
+ i++;
} else if (child.getNodeName().endsWith(PANEL_MENU_ITEM_END)) {
RichFacesPanelMenuItemTemplate.encode(pageContext,
vpeCreationData, (Element) child, visualDocument, div,
active);
} else {
- Element childDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ Element childDiv = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childDiv);
div.appendChild(childDiv);
childrenInfo.addSourceChild(child);
vpeCreationData.addChildrenInfo(childrenInfo);
}
- i++;
- }
+ }
return vpeCreationData;
}
17 years, 3 months
JBoss Tools SVN: r4140 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 05:43:38 -0400 (Fri, 12 Oct 2007)
New Revision: 4140
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
Log:
JBIDE-544
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:40:32 UTC (rev 4139)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2007-10-12 09:43:38 UTC (rev 4140)
@@ -242,9 +242,9 @@
monitor.worked(1);
createWTPNature2(wcco, monitor);
monitor.worked(1);
- // register tomcat application
- registerTomcat2(monitor);
- ///registerTomcat(monitor);
+ // register application
+ registerServer2(monitor);
+ ///registerServer(monitor);
} catch (CoreException e) {
WebModelPlugin.getPluginLog().logError(e);
} finally {
@@ -299,23 +299,23 @@
/*
*
*/
- private void registerTomcat2(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ private void registerServer2(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
XModelObject fs = FileSystemsHelper.getFileSystems(model);
model.changeObjectAttribute(fs, "application name", registry.getApplicationName());
fs.setModified(true);
model.save();
ModelPlugin.getDefault().getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
- Job job = new RegisterTomcatJob();
+ Job job = new RegisterServerJob();
job.schedule(100);
}
});
}
- class RegisterTomcatJob extends Job {
+ class RegisterServerJob extends Job {
long counter = 100;
- public RegisterTomcatJob() {
+ public RegisterServerJob() {
super("Register in Server");
}
@@ -342,7 +342,7 @@
class WR implements IWorkspaceRunnable {
public void run(IProgressMonitor monitor) throws CoreException {
try {
- registerTomcat(monitor);
+ registerServer(monitor);
} catch (Exception e) {
WebUiPlugin.getPluginLog().logError(e);
}
@@ -353,7 +353,7 @@
/*
*
*/
- private void registerTomcat(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ private void registerServer(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (!registry.isEnabled()) return;
if(monitor != null) monitor.beginTask("", 100);
if(monitor != null) monitor.worked(5);
17 years, 3 months
JBoss Tools SVN: r4139 - in trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts: webprj/model/helpers/context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 05:40:32 -0400 (Fri, 12 Oct 2007)
New Revision: 4139
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsPreference.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/ImportProjectWizardContext.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/NewProjectWizardContext.java
Log:
JBIDE-544
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsPreference.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsPreference.java 2007-10-12 09:40:19 UTC (rev 4138)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsPreference.java 2007-10-12 09:40:32 UTC (rev 4139)
@@ -25,8 +25,8 @@
public static final Preference DEFAULT_PROJECT_ROOT_DIR = new StrutsPreference(OPTIONS_NEW_PROJECT_PATH, "Projects Root");
public static final Preference DEFAULT_TLD_SET = new StrutsPreference(OPTIONS_NEW_PROJECT_PATH, "Default TLDs");
- public static final Preference REGISTER_NEW_PROJECT_IN_TOMCAT = new StrutsPreference(OPTIONS_NEW_PROJECT_PATH, ATTR_REGISTER_IN_TOMCAT);
- public static final Preference REGISTER_IMPORTED_PROJECT_IN_TOMCAT = new StrutsPreference(OPTIONS_IMPORT_PROJECT_PATH, ATTR_REGISTER_IN_TOMCAT);
+ public static final Preference REGISTER_NEW_PROJECT_IN_SERVER = new StrutsPreference(OPTIONS_NEW_PROJECT_PATH, ATTR_REGISTER_IN_SERVER);
+ public static final Preference REGISTER_IMPORTED_PROJECT_IN_SERVER = new StrutsPreference(OPTIONS_IMPORT_PROJECT_PATH, ATTR_REGISTER_IN_SERVER);
public static final Preference DEFAULT_STRUTS_IMPORT_SERVLET_VERSION = new StrutsPreference(OPTIONS_IMPORT_PROJECT_PATH, "Servlet Version");
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/ImportProjectWizardContext.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/ImportProjectWizardContext.java 2007-10-12 09:40:19 UTC (rev 4138)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/ImportProjectWizardContext.java 2007-10-12 09:40:32 UTC (rev 4139)
@@ -39,9 +39,9 @@
}
protected void initRegistry() {
- getRegisterTomcatContext().setNatureIndex(StrutsProjectUtil.NATURE_NICK);
- getRegisterTomcatContext().setPreferences(StrutsPreference.REGISTER_IMPORTED_PROJECT_IN_TOMCAT);
- getRegisterTomcatContext().init();
+ getRegisterServerContext().setNatureIndex(StrutsProjectUtil.NATURE_NICK);
+ getRegisterServerContext().setPreferences(StrutsPreference.REGISTER_IMPORTED_PROJECT_IN_SERVER);
+ getRegisterServerContext().init();
}
public void setPexFileName(String value) {
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/NewProjectWizardContext.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/NewProjectWizardContext.java 2007-10-12 09:40:19 UTC (rev 4138)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/context/NewProjectWizardContext.java 2007-10-12 09:40:32 UTC (rev 4139)
@@ -15,7 +15,7 @@
import org.jboss.tools.struts.StrutsPreference;
import org.jboss.tools.struts.StrutsProjectUtil;
import org.jboss.tools.struts.StrutsUtils;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.project.helpers.IWebProjectTemplate;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
@@ -31,7 +31,7 @@
protected void initRegistry() {
registry.setNatureIndex(StrutsProjectUtil.NATURE_NICK);
- registry.setPreferences(StrutsPreference.REGISTER_NEW_PROJECT_IN_TOMCAT);
+ registry.setPreferences(StrutsPreference.REGISTER_NEW_PROJECT_IN_SERVER);
registry.init();
}
@@ -56,7 +56,7 @@
}
}
- public RegisterTomcatContext getRegisterTomcatContext() {
+ public RegisterServerContext getRegisterServerContext() {
return registry;
}
17 years, 3 months
JBoss Tools SVN: r4138 - in trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web: context and 1 other directories.
by jbosstools-commits@lists.jboss.org
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;
}
17 years, 3 months
JBoss Tools SVN: r4137 - in trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui: wizard/project and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 05:40:03 -0400 (Fri, 12 Oct 2007)
New Revision: 4137
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/operation/JSFProjectCreationOperation.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java
Log:
JBIDE-544
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/operation/JSFProjectCreationOperation.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/operation/JSFProjectCreationOperation.java 2007-10-12 09:39:52 UTC (rev 4136)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/operation/JSFProjectCreationOperation.java 2007-10-12 09:40:03 UTC (rev 4137)
@@ -28,14 +28,14 @@
import org.jboss.tools.jsf.project.JSFNature;
import org.jboss.tools.jsf.web.JSFTemplate;
import org.jboss.tools.jst.web.WebUtils;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.project.helpers.IWebProjectTemplate;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
import org.jboss.tools.jst.web.ui.operation.WebProjectCreationOperation;
public class JSFProjectCreationOperation extends WebProjectCreationOperation {
- public JSFProjectCreationOperation(IProject project, IPath projectLocation, RegisterTomcatContext registry, Properties properties) {
+ public JSFProjectCreationOperation(IProject project, IPath projectLocation, RegisterServerContext registry, Properties properties) {
super(project, projectLocation, registry, properties);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java 2007-10-12 09:39:52 UTC (rev 4136)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/project/ImportProjectFoldersPage.java 2007-10-12 09:40:03 UTC (rev 4137)
@@ -60,7 +60,7 @@
protected ImportProjectFoldersPage(ImportWebProjectContext context) {
super("Import Project Folders");
this.context = context;
- appRegister.setContext(context.getRegisterTomcatContext());
+ appRegister.setContext(context.getRegisterServerContext());
appRegister.setLayoutForSupport(getLayoutForSupport());
appRegister.setEnabling(false);
17 years, 3 months
JBoss Tools SVN: r4136 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui: operation and 2 other directories.
by jbosstools-commits@lists.jboss.org
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) {
17 years, 3 months
JBoss Tools SVN: r4135 - in trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui: wizard/project and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 05:39:33 -0400 (Fri, 12 Oct 2007)
New Revision: 4135
Modified:
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/operation/StrutsProjectCreationOperation.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectFoldersPage.java
Log:
JBIDE-544
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/operation/StrutsProjectCreationOperation.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/operation/StrutsProjectCreationOperation.java 2007-10-12 09:39:24 UTC (rev 4134)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/operation/StrutsProjectCreationOperation.java 2007-10-12 09:39:33 UTC (rev 4135)
@@ -28,7 +28,7 @@
import org.jboss.tools.struts.StrutsProjectUtil;
import org.jboss.tools.struts.StrutsUtils;
import org.jboss.tools.jst.web.WebUtils;
-import org.jboss.tools.jst.web.context.RegisterTomcatContext;
+import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.project.helpers.IWebProjectTemplate;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
import org.jboss.tools.jst.web.ui.operation.WebNatureOperation;
@@ -37,7 +37,7 @@
public class StrutsProjectCreationOperation extends WebProjectCreationOperation {
- public StrutsProjectCreationOperation(IProject project, IPath projectLocation, RegisterTomcatContext registry, Properties properties) {
+ public StrutsProjectCreationOperation(IProject project, IPath projectLocation, RegisterServerContext registry, Properties properties) {
super(project, projectLocation, registry, properties);
setProperty(WebNatureOperation.TLDS_ID, properties.getProperty(NewProjectWizardContext.ATTR_TLDS));
}
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectFoldersPage.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectFoldersPage.java 2007-10-12 09:39:24 UTC (rev 4134)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectFoldersPage.java 2007-10-12 09:39:33 UTC (rev 4135)
@@ -59,7 +59,7 @@
this.context = context;
context.setServletVersion(StrutsPreference.DEFAULT_STRUTS_IMPORT_SERVLET_VERSION.getValue());
- appRegister.setContext(context.getRegisterTomcatContext());
+ appRegister.setContext(context.getRegisterServerContext());
appRegister.setLayoutForSupport(getLayoutForSupport());
//For new WTP
appRegister.setEnabling(false);
17 years, 3 months
JBoss Tools SVN: r4134 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf: web/helpers/context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 05:39:24 -0400 (Fri, 12 Oct 2007)
New Revision: 4134
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFPreference.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/ImportProjectWizardContext.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/NewProjectWizardContext.java
Log:
JBIDE-544
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java 2007-10-12 09:09:59 UTC (rev 4133)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java 2007-10-12 09:39:24 UTC (rev 4134)
@@ -46,8 +46,8 @@
PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.DEFAULT_JSF_PROJECT_TEMPLATE);
PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.DEFAULT_JSF_PROJECT_ROOT_DIR);
PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.DEFAULT_JSF_SERVLET_VERSION);
- PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.REGISTER_NEW_JSF_PROJECT_IN_TOMCAT);
- PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.REGISTER_IMPORTED_JSF_PROJECT_IN_TOMCAT);
+ PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.REGISTER_NEW_JSF_PROJECT_IN_SERVER);
+ PreferenceModelUtilities.initPreferenceValue(initialModel, JSFPreference.REGISTER_IMPORTED_JSF_PROJECT_IN_SERVER);
PreferenceModelUtilities.getPreferenceModel().save();
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFPreference.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFPreference.java 2007-10-12 09:09:59 UTC (rev 4133)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFPreference.java 2007-10-12 09:39:24 UTC (rev 4134)
@@ -28,8 +28,8 @@
public static final Preference DEFAULT_JSF_PROJECT_ROOT_DIR = new JSFPreference(OPTIONS_JSF_NEW_PROJECT_PATH, "Projects Root");
public static final Preference DEFAULT_JSF_SERVLET_VERSION = new JSFPreference(OPTIONS_JSF_NEW_PROJECT_PATH, "Servlet Version");
public static final Preference DEFAULT_JSF_IMPORT_SERVLET_VERSION = new JSFPreference(OPTIONS_JSF_IMPORT_PROJECT_PATH, "Servlet Version");
- public static final Preference REGISTER_NEW_JSF_PROJECT_IN_TOMCAT = new JSFPreference(OPTIONS_JSF_NEW_PROJECT_PATH, ATTR_REGISTER_IN_TOMCAT);
- public static final Preference REGISTER_IMPORTED_JSF_PROJECT_IN_TOMCAT = new JSFPreference(OPTIONS_JSF_IMPORT_PROJECT_PATH, ATTR_REGISTER_IN_TOMCAT);
+ public static final Preference REGISTER_NEW_JSF_PROJECT_IN_SERVER = new JSFPreference(OPTIONS_JSF_NEW_PROJECT_PATH, ATTR_REGISTER_IN_SERVER);
+ public static final Preference REGISTER_IMPORTED_JSF_PROJECT_IN_SERVER = new JSFPreference(OPTIONS_JSF_IMPORT_PROJECT_PATH, ATTR_REGISTER_IN_SERVER);
public static final Preference DO_NOT_CREATE_EMPTY_RULE = new JSFPreference(JSF_EDITOR_PATH, "doNotCreateEmptyRule");
public static final Preference ENABLE_CONTROL_MODE_ON_TRANSITION_COMPLETED = new JSFPreference(JSF_EDITOR_PATH, "enableControlModeOnTransitionCompleted");
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/ImportProjectWizardContext.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/ImportProjectWizardContext.java 2007-10-12 09:09:59 UTC (rev 4133)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/ImportProjectWizardContext.java 2007-10-12 09:39:24 UTC (rev 4134)
@@ -29,9 +29,9 @@
}
protected void initRegistry() {
- getRegisterTomcatContext().setNatureIndex(JSFNature.NATURE_NICK);
- getRegisterTomcatContext().setPreferences(JSFPreference.REGISTER_IMPORTED_JSF_PROJECT_IN_TOMCAT);
- getRegisterTomcatContext().init();
+ getRegisterServerContext().setNatureIndex(JSFNature.NATURE_NICK);
+ getRegisterServerContext().setPreferences(JSFPreference.REGISTER_IMPORTED_JSF_PROJECT_IN_SERVER);
+ getRegisterServerContext().init();
}
public void setPexFileName(String value) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/NewProjectWizardContext.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/NewProjectWizardContext.java 2007-10-12 09:09:59 UTC (rev 4133)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/NewProjectWizardContext.java 2007-10-12 09:39:24 UTC (rev 4134)
@@ -22,7 +22,7 @@
protected void initRegistry() {
registry.setNatureIndex(JSFNature.NATURE_NICK);
- registry.setPreferences(JSFPreference.REGISTER_NEW_JSF_PROJECT_IN_TOMCAT);
+ registry.setPreferences(JSFPreference.REGISTER_NEW_JSF_PROJECT_IN_SERVER);
registry.init();
}
17 years, 3 months