Author: scabanovich
Date: 2009-05-12 06:30:36 -0400 (Tue, 12 May 2009)
New Revision: 15222
Removed:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizardView.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4303
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2009-05-12 09:32:44 UTC (rev
15221)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2009-05-12 10:30:36 UTC (rev
15222)
@@ -3,8 +3,6 @@
<plugin>
<extension point="org.jboss.tools.common.model.specialwizard">
- <specialwizard
class="org.jboss.tools.jst.web.ui.wizards.tomcatvm.TomcatVMWizard"
id="org.jboss.tools.jst.web.ui.wizards.tomcatvm.TomcatVMWizard">
- </specialwizard>
<specialwizard
class="org.jboss.tools.jst.web.ui.wizards.appregister.AppRegisterWizard"
id="org.jboss.tools.jst.web.ui.wizards.appregister.AppRegisterWizard">
</specialwizard>
<specialwizard
class="org.jboss.tools.jst.web.ui.wizards.links.HiddenLinksWizard"
id="org.jboss.tools.jst.web.ui.wizards.links.HiddenLinksWizard">
@@ -557,14 +555,10 @@
class="org.jboss.tools.jst.web.ui.wizards.project.AddProjectTemplateVelocityView"/>
<xclass
id="org.jboss.tools.jst.web.ui.wizards.project.EditProjectTemplateView"
class="org.jboss.tools.jst.web.ui.wizards.project.EditProjectTemplateView"/>
- <xclass id="org.jboss.tools.jst.web.ui.wizards.tomcatvm.TomcatVMWizard"
- class="org.jboss.tools.jst.web.ui.wizards.tomcatvm.TomcatVMWizard"/>
<xclass id="org.jboss.tools.jst.web.ui.editors.forms.TLDFormLayoutData"
class="org.jboss.tools.jst.web.ui.editors.forms.TLDFormLayoutData"/>
<xclass
id="org.jboss.tools.jst.web.ui.editors.webapp.form.WebAppFormLayoutData"
class="org.jboss.tools.jst.web.ui.editors.webapp.form.WebAppFormLayoutData"/>
- <xclass id="org.jboss.tools.jst.web.ui.wizards.tomcatvm.TomcatVMWizard"
- class="org.jboss.tools.jst.web.ui.wizards.tomcatvm.TomcatVMWizard"/>
<xclass id="org.jboss.tools.jst.web.ui.wizards.links.HiddenLinksWizard"
class="org.jboss.tools.jst.web.ui.wizards.links.HiddenLinksWizard"/>
</extension>
Deleted:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizard.java 2009-05-12
09:32:44 UTC (rev 15221)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizard.java 2009-05-12
10:30:36 UTC (rev 15222)
@@ -1,29 +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.ui.wizards.tomcatvm;
-
-import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizard;
-
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
-import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
-
-public class TomcatVMWizard extends AbstractQueryWizard {
- public TomcatVMWizard() {
- setView(new TomcatVMWizardView());
- }
-
- public void setObject(Object object) {
- getView().setModel(PreferenceModelUtilities.getPreferenceModel());
- getView().setObject(object);
- getView().setWindowTitle(WebUIMessages.START_TOMCAT_SERVER);
- getView().setTitle(WebUIMessages.CHECK_JVM);
- }
-}
Deleted:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizardView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizardView.java 2009-05-12
09:32:44 UTC (rev 15221)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/tomcatvm/TomcatVMWizardView.java 2009-05-12
10:30:36 UTC (rev 15222)
@@ -1,90 +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.ui.wizards.tomcatvm;
-
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.*;
-import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
-import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView;
-import org.jboss.tools.common.meta.action.*;
-import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
-import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
-import org.jboss.tools.jst.web.tomcat.TomcatVMHelper;
-
-public class TomcatVMWizardView extends AbstractQueryWizardView {
- XAttributeSupport support = new XAttributeSupport();
- Properties context;
-
- public TomcatVMWizardView() {
- XEntityData data = XEntityDataImpl.create(new String[][]{{"TomcatVMHelper",
"yes"}, {"vm", "yes"}, /*{"ignore",
"no"}*/}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- data.setValue("vm",
TomcatVMHelper.getJVMInstall().getInstallLocation().getAbsolutePath()); //$NON-NLS-1$
-// data.setValue("ignore", "no");
- support.init(PreferenceModelUtilities.getPreferenceModel().getRoot(), data);
- }
-
- public void dispose() {
- super.dispose();
- if (support!=null) support.dispose();
- support = null;
- }
- public Control createControl(Composite parent) {
- Control c = support.createControl(parent);
- support.getPropertyEditorAdapterByName("vm").addValueChangeListener(new
InputChangeListener()); //$NON-NLS-1$
- validate();
- return c;
- }
-
- private void validate() {
- String location = getLocation();
- String message = null;
- String errorMessage = null;
- if(location.length() == 0) {
- errorMessage = WebUIMessages.PATH_TO_JVM_IS_EMPTY;
- } else if(!new java.io.File(location).isDirectory()) {
- errorMessage = WebUIMessages.SPECIFIED_FOLDER_DOESNOT_EXIST;
- } else if(!new java.io.File(location + "/bin/java.exe").isFile()) {
//$NON-NLS-1$
- errorMessage = WebUIMessages.SPECIFIED_FOLDER_ISNOT_JVMHOME;
- } else if(TomcatVMHelper.findToolsJarInVM(location) == null) {
- message = WebUIMessages.CANNOT_FIND_TOOLSJAR;
- }
- setErrorMessage(errorMessage);
- commandBar.setEnabled(OK, errorMessage == null);
- setMessage(message);
- }
-
- public void setObject(Object object) {
- context = (Properties)object;
- }
-
- class InputChangeListener implements java.beans.PropertyChangeListener {
- public void propertyChange(java.beans.PropertyChangeEvent evt) {
- validate();
- }
- }
-
- public void stopEditing() {
- support.save();
- context.setProperty("vm", getLocation()); //$NON-NLS-1$
- }
-
- private String getLocation() {
- return support.getValues().getProperty("vm"); //$NON-NLS-1$
- }
-
- public Point getPreferredSize() {
- return new Point(500, SWT.DEFAULT);
- }
-
-}