JBoss Tools SVN: r7704 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-04-23 07:28:04 -0400 (Wed, 23 Apr 2008)
New Revision: 7704
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBIDE-2114
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-04-23 11:04:41 UTC (rev 7703)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-04-23 11:28:04 UTC (rev 7704)
@@ -2637,7 +2637,8 @@
public void selectionChanged(SelectionChangedEvent event) {
//FIX for JBIDE-2114
if (!isVisualEditorVisible()) {
- synced = false;
+ //selection event doesn't changes a content
+// synced = false;
return;
}
//TODO Max Areshkau Adjust this code, now we haven's source mode
16 years, 6 months
JBoss Tools SVN: r7703 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-04-23 07:04:41 -0400 (Wed, 23 Apr 2008)
New Revision: 7703
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBIDE-2114
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-04-23 08:34:25 UTC (rev 7702)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-04-23 11:04:41 UTC (rev 7703)
@@ -396,7 +396,7 @@
final int eventType, final Object feature, final Object oldValue,
final Object newValue, final int pos) {
- if (!visualEditorVisible) {
+ if (!isVisualEditorVisible()) {
synced = false;
return;
}
@@ -2635,24 +2635,31 @@
}
public void selectionChanged(SelectionChangedEvent event) {
- if (editPart.getVisualMode() != VpeEditorPart.SOURCE_MODE) {
- if (toolbarFormatControllerManager != null)
- toolbarFormatControllerManager.selectionChanged();
- }
-
- if (selectionBar != null)
- selectionBar.selectionChanged();
-
- if (!switcher
- .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
- return;
- }
- if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
- System.out
- .println(">>>>>>>>>>>>>> selectionChanged " + event.getSource()); //$NON-NLS-1$
- }
- sourceSelectionChanged();
- switcher.stopActiveEditor();
+ //FIX for JBIDE-2114
+ if (!isVisualEditorVisible()) {
+ synced = false;
+ return;
+ }
+ //TODO Max Areshkau Adjust this code, now we haven's source mode
+ if (editPart.getVisualMode() != VpeEditorPart.SOURCE_MODE) {
+ if (toolbarFormatControllerManager != null)
+ toolbarFormatControllerManager.selectionChanged();
+ }
+
+ if (selectionBar != null)
+ selectionBar.selectionChanged();
+
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ return;
+ }
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
+ System.out
+ .println(">>>>>>>>>>>>>> selectionChanged " + event.getSource()); //$NON-NLS-1$
+ }
+ sourceSelectionChanged();
+ switcher.stopActiveEditor();
+
}
// nsIClipboardDragDropHooks implementation
16 years, 6 months
JBoss Tools SVN: r7702 - trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-23 04:34:25 -0400 (Wed, 23 Apr 2008)
New Revision: 7702
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/StatusUtils.java
Log:
Added: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/StatusUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/StatusUtils.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/StatusUtils.java 2008-04-23 08:34:25 UTC (rev 7702)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.core.utils;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+
+public class StatusUtils
+{
+ public static IStatus errorStatus( String errorMessage )
+ {
+ return new Status( IStatus.ERROR, "id", 0, errorMessage, null );
+ }
+
+ public static IStatus errorStatus( Throwable exc )
+ {
+ String message = exc.getMessage();
+
+ return new Status( IStatus.ERROR, "id", 0, message == null ? "" : message, exc );
+ }
+
+ public static IStatus errorStatus( String message, Throwable exc )
+ {
+ return new Status( IStatus.ERROR, "id", 0, message, exc );
+ }
+
+ public static MultiStatus multiStatus( String message, IStatus[] children, Throwable exc )
+ {
+ return new MultiStatus( "id", 0, children, message, exc );
+ }
+
+ public static MultiStatus multiStatus( String message, IStatus[] children )
+ {
+ return new MultiStatus( "id", 0, children, message, null );
+ }
+
+ public static IStatus warningStatus( String warningMessage )
+ {
+ return new Status( IStatus.WARNING, "id", 0, warningMessage, null );
+ }
+
+ public static IStatus warningStatus( String warningMessage, Throwable exc )
+ {
+ return new Status( IStatus.WARNING, "id", 0, warningMessage, exc );
+ }
+
+ public static IStatus infoStatus( String infoMessage )
+ {
+ return new Status( IStatus.INFO, "id", 0, infoMessage, null );
+ }
+}
\ No newline at end of file
16 years, 6 months
JBoss Tools SVN: r7701 - in trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core: command and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-23 04:33:57 -0400 (Wed, 23 Apr 2008)
New Revision: 7701
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties 2008-04-23 07:50:21 UTC (rev 7700)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCore.properties 2008-04-23 08:33:57 UTC (rev 7701)
@@ -1,4 +1,5 @@
PROGRESS_INSTALL_JBOSSWS_RUNTIME=JBoss Web Service Runtime
DIR_LIB=lib
DIR_WEB_INF=WEB-INF
-DIR_WEB_CONTENT=WebContent
\ No newline at end of file
+DIR_WEB_CONTENT=WebContent
+ERROR_COPY=Exception while copy JBossWS jars
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-04-23 07:50:21 UTC (rev 7700)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-04-23 08:33:57 UTC (rev 7701)
@@ -25,6 +25,7 @@
public static String DIR_LIB;
public static String DIR_WEB_INF;
public static String DIR_WEB_CONTENT;
+ public static String ERROR_COPY;
static {
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-04-23 07:50:21 UTC (rev 7700)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-04-23 08:33:57 UTC (rev 7701)
@@ -11,8 +11,6 @@
package org.jboss.tools.ws.core.command;
-import java.util.List;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IAdaptable;
@@ -42,13 +40,13 @@
}
public IStatus executeOverride(IProgressMonitor monitor) {
- IStatus status = null;
+ IStatus status = Status.OK_STATUS;
IPreferenceStore ps = JbossWSCorePlugin.getDefault()
.getPreferenceStore();
runtimeLocation = ps.getString("jbosswsruntimelocation");
- // copy lib to project's folder
+ // copy jars to project's folder
IPath libPath = new Path(runtimeLocation);
libPath = libPath.append(JbossWSCoreMessages.DIR_LIB);
@@ -57,54 +55,9 @@
targetPath = targetPath
.append(JbossWSCoreMessages.DIR_WEB_INF).append(
JbossWSCoreMessages.DIR_LIB);
- JbossWSCoreUtils.copy(libPath, targetPath);
+ status = JbossWSCoreUtils.copy(libPath, targetPath);
- status = Status.OK_STATUS;
return status;
}
- private void cleanupIfFacetStatusFailed(String runtimeLocation) {
- // File tempFacetDirectory = new File(runtimeLocation);
- // if (tempFacetDirectory.exists()) {
- // FileUtils.deleteDir(tempFacetDirectory);
- // }
- }
-
- private IStatus handleExceptionStatus(Exception e) {
- IStatus status = null;
- // status = new
- // Status(1,project.toString(),1,Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET,e);
- // cleanupIfFacetStatusFailed(Axis2CoreUtils.tempAxis2Directory());
- return status;
- }
-
- /**
- * Load the exact libraries list from the axis2 jars with the correct
- * versions to the <code>path</code>. Doing it this way introduce the
- * scalability to the solution where the need comes in the future releases
- * to include additional libraries and if needed filter out some libraries.
- *
- * @param runtimeLocation
- * @param includeList
- * @return loaded list
- */
- private List loadIncludeListWithAxis2Libs(String path, List includeList) {
- // for (int i = 0; i < Axis2Constants.AXIS2_LIB_PREFIXES.length; i++) {
- // File[] jarFileList = FileUtils.getMatchingFiles(path,
- // Axis2Constants.AXIS2_LIB_PREFIXES[i],
- // Axis2Constants.JAR);
- // for (int j = 0; j < jarFileList.length; j++) {
- // includeList.add(jarFileList[j].getAbsolutePath());
- // }
- // // Fix for the 205972
- // File[] licenseFileList = FileUtils.getMatchingFiles(path,
- // Axis2Constants.AXIS2_LIB_PREFIXES[i],
- // Axis2Constants.TXT);
- // for (int k = 0; k < licenseFileList.length; k++) {
- // includeList.add(licenseFileList[k].getAbsolutePath());
- // }
- // }
- return includeList;
- }
-
}
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-04-23 07:50:21 UTC (rev 7700)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-04-23 08:33:57 UTC (rev 7701)
@@ -14,7 +14,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.jboss.tools.ws.core.JbossWSCoreMessages;
@@ -22,22 +21,12 @@
public class JbossWSInstallRuntimeDelegate implements IDelegate {
- private IStatus status;
-
public void execute(IProject project, IProjectFacetVersion arg1, Object arg2,
IProgressMonitor monitor) throws CoreException {
monitor.beginTask(JbossWSCoreMessages.PROGRESS_INSTALL_JBOSSWS_RUNTIME, 2 );
JbossWSRuntimeCommand command = new JbossWSRuntimeCommand(project);
- status = command.executeOverride(monitor);
-// if (status.getCode() == Status.OK_STATUS.getCode() ){
-// RuntimePropertyUtils.writeServerStausToPropertiesFile(
-// Axis2Constants.SERVER_STATUS_PASS);
-// }else{
-// RuntimePropertyUtils.writeServerStausToPropertiesFile(
-// Axis2Constants.SERVER_STATUS_FAIL);
-// throw new CoreException(status);
-// }
+ command.executeOverride(monitor);
monitor.worked( 1 );
monitor.done();
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-04-23 07:50:21 UTC (rev 7700)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-04-23 08:33:57 UTC (rev 7701)
@@ -7,7 +7,7 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.ws.core.utils;
@@ -30,6 +30,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.ws.internal.common.J2EEUtils;
import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.ws.core.JbossWSCoreMessages;
public class JbossWSCoreUtils {
@@ -108,9 +109,10 @@
getProjectNameFromFramewokNameString(projectString));
}
- public static void copy(IPath sourcePath, IPath targetPath) {
+ public static IStatus copy(IPath sourcePath, IPath targetPath) {
System.out.println(sourcePath + " >> " + targetPath);
+ IStatus status = Status.OK_STATUS;
File sourceDir = sourcePath.toFile();
File[] children = sourceDir.listFiles();
@@ -120,26 +122,32 @@
try {
finStream = new FileInputStream(children[i]);
} catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ status = StatusUtils.errorStatus(
+ NLS.bind(JbossWSCoreMessages.ERROR_COPY,
+ new String[]{e.getLocalizedMessage()}), e);
}
try {
makeFile(getWorkspaceRoot().getContainerForLocation(
targetPath), children[i].getName(), finStream);
} catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ status = StatusUtils.errorStatus(
+ NLS.bind(JbossWSCoreMessages.ERROR_COPY,
+ new String[]{e.getLocalizedMessage()}), e);
}
} else {
try {
- copy(sourcePath.append(children[i].getName()),makeFolder(getWorkspaceRoot().getContainerForLocation(
- targetPath),children[i].getName()).getFullPath());
+ copy(sourcePath.append(children[i].getName()), makeFolder(
+ getWorkspaceRoot().getContainerForLocation(
+ targetPath), children[i].getName())
+ .getFullPath());
} catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ status = StatusUtils.errorStatus(
+ NLS.bind(JbossWSCoreMessages.ERROR_COPY,
+ new String[]{e.getLocalizedMessage()}), e);
}
}
}
+ return status;
}
private static IFolder makeFolder(IContainer parent, String folderName)
16 years, 6 months
JBoss Tools SVN: r7700 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-23 03:50:21 -0400 (Wed, 23 Apr 2008)
New Revision: 7700
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/UIUtils.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/UIUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/UIUtils.java 2008-04-23 07:40:43 UTC (rev 7699)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/UIUtils.java 2008-04-23 07:50:21 UTC (rev 7700)
@@ -492,7 +492,7 @@
* <code>extension</code>
*/
public static File[] getMatchingFiles(String sourceDir, String fileNamePrefix, String extension) {
- List fileList = new ArrayList();
+ List<File> fileList = new ArrayList<File>();
File libDir = new File(sourceDir);
String libDirPath = libDir.getAbsolutePath();
String[] items = libDir.list();
16 years, 6 months
JBoss Tools SVN: r7699 - in trunk: documentation/guides/Exadel-migration and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-04-23 03:40:43 -0400 (Wed, 23 Apr 2008)
New Revision: 7699
Modified:
trunk/as/docs/reference/
trunk/documentation/guides/Exadel-migration/
trunk/documentation/guides/GettingStartedGuide/
trunk/documentation/jboss-tools-docs/
trunk/hibernatetools/docs/reference/
trunk/jbpm/docs/reference/
trunk/jsf/docs/jsf_tools_ref_guide/
trunk/jsf/docs/jsf_tools_tutorial/
trunk/jsf/docs/userguide/
trunk/seam/docs/reference/
trunk/struts/docs/struts_tools_ref_guide/
trunk/struts/docs/struts_tools_tutorial/
Log:
svn:ignore target dir in docbook builds
Property changes on: trunk/as/docs/reference
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/documentation/guides/Exadel-migration
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/documentation/guides/GettingStartedGuide
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/documentation/jboss-tools-docs
___________________________________________________________________
Name: svn:ignore
- bin
build
+ bin
build
target
Property changes on: trunk/hibernatetools/docs/reference
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/jbpm/docs/reference
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/jsf/docs/jsf_tools_tutorial
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/jsf/docs/userguide
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/docs/reference
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/struts/docs/struts_tools_ref_guide
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/struts/docs/struts_tools_tutorial
___________________________________________________________________
Name: svn:ignore
+ target
16 years, 6 months
JBoss Tools SVN: r7698 - in trunk/ws/plugins/org.jboss.tools.ws.creation.core: src/org/jboos/tools/ws/creation/core/commands and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-04-23 03:38:18 -0400 (Wed, 23 Apr 2008)
New Revision: 7698
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
Log:
to make Topdown jaxws work in wtp under Windows system
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-04-23 07:28:50 UTC (rev 7697)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-04-23 07:38:18 UTC (rev 7698)
@@ -12,7 +12,8 @@
org.jboss.tools.ws.ui,
org.eclipse.core.resources,
org.eclipse.jst.ws,
- org.jboss.tools.ws.core
+ org.jboss.tools.ws.core,
+ org.eclipse.wst.wsdl
Eclipse-LazyStart: true
Export-Package: org.jboos.tools.ws.creation.core,
org.jboos.tools.ws.creation.core.commands,
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-23 07:28:50 UTC (rev 7697)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-23 07:38:18 UTC (rev 7698)
@@ -8,6 +8,11 @@
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.eclipse.wst.ws.internal.wsrt.IWebService;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.eclipse.wst.wsdl.WSDLFactory;
+import org.eclipse.wst.wsdl.internal.impl.wsdl4j.WSDLFactoryImpl;
+import org.eclipse.wst.wsdl.internal.util.WSDLDefinitionFactory;
+import org.eclipse.wst.wsdl.internal.util.WSDLUtil;
+import org.eclipse.wst.wsdl.util.WSDLParser;
import org.jboos.tools.ws.creation.core.data.ServiceModel;
public class InitialCommnad extends AbstractDataModelOperation{
@@ -32,7 +37,8 @@
}
public ServiceModel getWebServiceDataModel()
- {
+ {
+
return model;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-23 07:28:50 UTC (rev 7697)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-23 07:38:18 UTC (rev 7698)
@@ -2,7 +2,6 @@
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
@@ -11,10 +10,8 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.PreferenceStore;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.jboos.tools.ws.creation.core.data.ServiceModel;
import org.jboos.tools.ws.creation.core.utils.JBossWSCreationUtils;
@@ -34,27 +31,22 @@
throws ExecutionException {
String runtimeLocation = JbossWSCorePlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
- String binLocation = runtimeLocation + Path.SEPARATOR + "bin";
+ String commandLocation = runtimeLocation + Path.SEPARATOR + "bin";
+ String command = "sh wsconsume.sh ";
+ if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){
+ command += "cmd wsconsume.bat";
+ }
+ String args = getCommandlineArgs();
+ command += " -k " + args + " " + model.getWsdlURI();
- String commandLine = binLocation + Path.SEPARATOR + "wsconsume.sh";
-
- String args = getCommandlineArgs();
-
- commandLine = commandLine + " -k " + args + " " + model.getWsdlURI();
- commandLine = "sh " + commandLine;
-
-
-
try {
-
- InputStreamReader ir = new InputStreamReader(Runtime.getRuntime().exec(commandLine, null, new File(binLocation)).getInputStream());
- LineNumberReader input = new LineNumberReader(ir);
-
- String str = "";
- for (int i = 1; str != null; i++)
- {
+
+ InputStreamReader ir = new InputStreamReader(Runtime.getRuntime().exec(command, null, new File(commandLocation)).getInputStream());
+ LineNumberReader input = new LineNumberReader(ir);
+ String str = input.readLine();
+ while(str != null){
+ System.out.println(str);
str = input.readLine();
- System.out.println(str);
}
@@ -63,14 +55,14 @@
e.printStackTrace();
}
- refreshProject(model.getWebProjectName());
+ refreshProject(model.getWebProjectName(), monitor);
return Status.OK_STATUS;
}
- private void refreshProject(String project){
+ private void refreshProject(String project, IProgressMonitor monitor){
try {
- JBossWSCreationUtils.getProjectByName(project).refreshLocal(2, new NullProgressMonitor());
+ JBossWSCreationUtils.getProjectByName(project).refreshLocal(2, monitor);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -100,5 +92,28 @@
}
-
+/* private List<String> getEnv(){
+ List<String> env = new ArrayList<String>();
+
+ String project = model.getWebProjectName();
+ String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
+ env.add("o=" + projectRoot + Path.SEPARATOR + "src");
+
+ String customePkg = model.getPackageText();
+ if(customePkg != null && !"".equals(customePkg)){
+ env.add(" p=" + customePkg);
+ }
+
+ String bindingFileLocation = model.getBindingFileLocation();
+ if(bindingFileLocation != null && !"".equals(bindingFileLocation)){
+ File bindingFile = new File(bindingFileLocation);
+ if(bindingFile.exists()){
+ env.add("b=" + bindingFileLocation);
+ }
+ }
+
+ return env;
+
+ }
+*/
}
16 years, 6 months
JBoss Tools SVN: r7697 - in trunk/ws/plugins/org.jboss.tools.ws.ui: src/org/jboss/tools/ws/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-23 03:28:50 -0400 (Wed, 23 Apr 2008)
New Revision: 7697
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties 2008-04-23 07:28:39 UTC (rev 7696)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties 2008-04-23 07:28:50 UTC (rev 7697)
@@ -1,3 +1,3 @@
-JBOSSWS_PREFERENCE_PAGE=JbossWS Preferences
+JBOSSWS_PREFERENCE_PAGE=JBossWS Preferences
PLUGIN_NAME=JBossWS UI
PLUGIN_PROVIDER=Red Hat, Inc.
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUI.properties 2008-04-23 07:28:39 UTC (rev 7696)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUI.properties 2008-04-23 07:28:50 UTC (rev 7697)
@@ -17,7 +17,7 @@
JBOSSWS_LOCATION=JBossWS Runtime
JBOSSWS_RUNTIME=JBossWS Runtime
JBOSSWS_PREFERENCES=JBossWS Preferences
-JBOSSWS_RUNTIME_TOOLTIP=Select the JBossWS binary distribution folder or the folder which contains the JBossWS war distribution
+JBOSSWS_RUNTIME_TOOLTIP=Select the JBossWS binary distribution folder
JBOSSWS_PREFERENCES_TOOLTIP=Select the default preferences for JBossWS runtime
JBOSSWS_RUNTIME_LOCATION=JBossWS runtime location:
JBOSSWS_RUNTIME_PREFERENCES=JBossWS Runtime Preferences
@@ -35,4 +35,7 @@
TEMP_JBOSSWS_FACET_DIR=org.jboss.tools.ws.facet
WEBAPP_EXPLODED_SERVER_LOCATION_FILE=server.properties
SERVER_STATUS_LOCATION_FILE=status.properties
-WAR_STATUS_LOCATION_FILE=war.properties
\ No newline at end of file
+WAR_STATUS_LOCATION_FILE=war.properties
+
+COMMOND=wsconsume.sh
+BIN=bin
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIMessages.java 2008-04-23 07:28:39 UTC (rev 7696)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIMessages.java 2008-04-23 07:28:50 UTC (rev 7697)
@@ -61,6 +61,9 @@
public static String SERVER_STATUS_LOCATION_FILE;
public static String WAR_STATUS_LOCATION_FILE;
+ public static String BIN;
+ public static String COMMOND;
+
static {
NLS.initializeMessages(BUNDLE_NAME, JbossWSUIMessages.class);
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java 2008-04-23 07:28:39 UTC (rev 7696)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIPlugin.java 2008-04-23 07:28:50 UTC (rev 7697)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.ws.ui;
import org.eclipse.ui.plugin.AbstractUIPlugin;
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-23 07:28:39 UTC (rev 7696)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-23 07:28:50 UTC (rev 7697)
@@ -7,7 +7,7 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.ws.ui.preferences;
@@ -22,11 +22,10 @@
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
@@ -38,290 +37,162 @@
import org.jboss.tools.ws.ui.JbossWSUIPlugin;
import org.jboss.tools.ws.ui.UIUtils;
-public class JbossWSRuntimePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+public class JbossWSRuntimePreferencePage extends PreferencePage implements
+ IWorkbenchPreferencePage {
- private Text jbosswsPath;
- private Text statusLabel;
- private Combo aarExtensionCombo;
- private Combo serviceDatabindingCombo;
- private Combo clientDatabindingCombo;
- private Button generateServerSideInterfaceCheckBoxButton;
- private Button generateAllCheckBoxButton;
- private Button syncAndAsyncRadioButton;
- private Button syncOnlyRadioButton;
- private Button asyncOnlyRadioButton;
- private Button clientTestCaseCheckBoxButton;
- private Button clientGenerateAllCheckBoxButton;
+ private Text jbosswsPath;
+ private Label statusLabel;
- protected Control createContents(Composite superparent) {
-
- IPreferenceStore ps = JbossWSCorePlugin.getDefault().getPreferenceStore();
- this.setPreferenceStore(ps);
-
- UIUtils uiUtils = new UIUtils(JbossWSUIPlugin.PLUGIN_ID);
- final Composite mainComp = uiUtils.createComposite(superparent, 1);
-
- TabFolder jbosswsPreferenceTab = new TabFolder(mainComp, SWT.WRAP);
- jbosswsPreferenceTab.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH) );
+ protected Control createContents(Composite superparent) {
-
- //-----------------------------Axis2 Runtime Location Group------------------------------//
- TabItem runtimeInstalLocationItem = new TabItem(jbosswsPreferenceTab, SWT.WRAP);
- runtimeInstalLocationItem.setText(JbossWSUIMessages.JBOSSWS_RUNTIME);
- runtimeInstalLocationItem.setToolTipText(JbossWSUIMessages.JBOSSWS_RUNTIME_TOOLTIP);
-
- Composite runtimeTab = uiUtils.createComposite(jbosswsPreferenceTab, 1);
- runtimeTab.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH ) );
- Composite runtimeGroup = uiUtils.createComposite(runtimeTab, 3);
+ IPreferenceStore ps = JbossWSCorePlugin.getDefault()
+ .getPreferenceStore();
+ this.setPreferenceStore(ps);
- runtimeInstalLocationItem.setControl(runtimeTab);
- runtimeTab.setToolTipText(JbossWSUIMessages.JBOSSWS_RUNTIME_TOOLTIP);
+ UIUtils uiUtils = new UIUtils(JbossWSUIPlugin.PLUGIN_ID);
+ final Composite mainComp = uiUtils.createComposite(superparent, 1);
- jbosswsPath = uiUtils.createText(runtimeGroup, JbossWSUIMessages.JBOSSWS_RUNTIME_LOCATION , null, null , SWT.BORDER);
-
- Button browseButton = uiUtils.createPushButton(runtimeGroup, JbossWSUIMessages.LABEL_BROUSE, null, null);
- browseButton.addSelectionListener( new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleBrowse(mainComp.getShell());
- }
- });
+ TabFolder jbosswsPreferenceTab = new TabFolder(mainComp, SWT.WRAP);
+ jbosswsPreferenceTab.setLayoutData(new GridData(
+ GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL
+ | GridData.FILL_BOTH));
- jbosswsPath.addModifyListener( new ModifyListener(){
- public void modifyText(ModifyEvent e){
- statusUpdate(runtimeExist(jbosswsPath.getText()));
- // runtimeTab.layout();
- }
- });
- new org.eclipse.swt.widgets.Label(runtimeTab, SWT.HORIZONTAL); // Leave some vertical space.
- statusLabel = new Text(runtimeTab, SWT.BACKGROUND | SWT.READ_ONLY | SWT.CENTER | SWT.WRAP | SWT.H_SCROLL);
- statusLabel.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH) );
+ TabItem runtimeInstalLocationItem = new TabItem(jbosswsPreferenceTab,
+ SWT.WRAP);
+ runtimeInstalLocationItem.setText(JbossWSUIMessages.JBOSSWS_RUNTIME);
+ runtimeInstalLocationItem
+ .setToolTipText(JbossWSUIMessages.JBOSSWS_RUNTIME_TOOLTIP);
- //--------------------------------jbossws Runtime Preferences------------------------------//
+ Composite runtimeTab = uiUtils.createComposite(jbosswsPreferenceTab, 1);
+ runtimeTab.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.FILL_BOTH));
+ Composite runtimeGroup = uiUtils.createComposite(runtimeTab, 3);
- TabItem codegenPreferencesItem = new TabItem(jbosswsPreferenceTab, SWT.WRAP);
- codegenPreferencesItem.setText(JbossWSUIMessages.JBOSSWS_PREFERENCES);
- codegenPreferencesItem.setToolTipText(JbossWSUIMessages.JBOSSWS_PREFERENCES_TOOLTIP);
+ runtimeInstalLocationItem.setControl(runtimeTab);
+ runtimeTab.setToolTipText(JbossWSUIMessages.JBOSSWS_RUNTIME_TOOLTIP);
- Composite codegenGroup = uiUtils.createComposite(jbosswsPreferenceTab, 1);
- codegenPreferencesItem.setControl(codegenGroup);
- codegenGroup.setToolTipText(JbossWSUIMessages.JBOSSWS_PREFERENCES_TOOLTIP);
+ jbosswsPath = uiUtils.createText(runtimeGroup,
+ JbossWSUIMessages.JBOSSWS_RUNTIME_LOCATION, null, null,
+ SWT.BORDER);
- ///////////////////////////////////////////////////////////////////////////////////////////
+ Button browseButton = uiUtils.createPushButton(runtimeGroup,
+ JbossWSUIMessages.LABEL_BROUSE, null, null);
+ browseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse(mainComp.getShell());
+ }
+ });
- //Service Codegen Options
- Composite serviceCodegenGroup = uiUtils.createComposite(codegenGroup, 1);
+ jbosswsPath.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ statusUpdate(runtimeExist(jbosswsPath.getText()));
- Text serviceCodegenGroupLabel= new Text(serviceCodegenGroup, SWT.READ_ONLY |SWT.WRAP);
- serviceCodegenGroupLabel.setText(JbossWSUIMessages.LABEL_WEB_SERVICE_CODEGEN);
+ }
+ });
+ new Label(runtimeTab, SWT.HORIZONTAL);
+ statusLabel = new Label(runtimeTab, SWT.BACKGROUND | SWT.READ_ONLY | SWT.CENTER | SWT.WRAP | SWT.H_SCROLL);
+ statusLabel.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.FILL_BOTH));
+
+ initializeValues();
+ jbosswsPreferenceTab.setEnabled(true);
+ jbosswsPreferenceTab.setVisible(true);
+ return mainComp;
+ }
- Composite dataBindComp = uiUtils.createComposite(serviceCodegenGroup, 2);
- //Data binding
- serviceDatabindingCombo = uiUtils.createCombo(dataBindComp, JbossWSUIMessages.LABEL_DATABINDING, null, null, SWT.READ_ONLY);
+ public void init(IWorkbench workbench) {
+ }
- //the server side interface option
- generateServerSideInterfaceCheckBoxButton = uiUtils.createCheckbox(serviceCodegenGroup, JbossWSUIMessages.LABEL_GENERATE_SERVERSIDE_INTERFACE, null, null);
-
- // generate all
- generateAllCheckBoxButton = uiUtils.createCheckbox(serviceCodegenGroup, JbossWSUIMessages.LABEL_GENERATE_ALL, null,null);
-
- uiUtils.createHorizontalSeparator(codegenGroup,2);
- ///////////////////////////////////////////////////////////////////////////////////////////
-
- ///Client Codegen Options
- Composite clientCodegenGroup = uiUtils.createComposite(codegenGroup, 1);
- Text clientCodegenGroupLabel= new Text(clientCodegenGroup, SWT.READ_ONLY);
- clientCodegenGroupLabel.setText(JbossWSUIMessages.LABEL_WEB_SERVICE_CLIENT_CODEGEN);
-
- Group clientModeRadioComp = uiUtils.createGroup(clientCodegenGroup, JbossWSUIMessages.LABEL_CLIENT_SIDE, null, null);
-
- //client side buttons
- syncAndAsyncRadioButton = uiUtils.createRadioButton(clientModeRadioComp, JbossWSUIMessages.LABEL_SYNC_AND_ASYNC, null, null);
- syncOnlyRadioButton = uiUtils.createRadioButton(clientModeRadioComp,JbossWSUIMessages.LABEL_SYNC, null, null);
- asyncOnlyRadioButton = uiUtils.createRadioButton(clientModeRadioComp, JbossWSUIMessages.LABEL_ASYNC, null, null);
-
- Composite dataBind = uiUtils.createComposite(clientCodegenGroup, 2);
- clientDatabindingCombo = uiUtils.createCombo(dataBind, JbossWSUIMessages.LABEL_DATABINDING, null, null, SWT.READ_ONLY);
-
- // generate test case option
- clientTestCaseCheckBoxButton = uiUtils.createCheckbox(clientCodegenGroup, JbossWSUIMessages.LABEL_GENERATE_TESTCASE_CAPTION, null, null);
-
- // generate all
- clientGenerateAllCheckBoxButton = uiUtils.createCheckbox(clientCodegenGroup, JbossWSUIMessages.LABEL_GENERATE_ALL, null, null);
-
-
- uiUtils.createHorizontalSeparator(codegenGroup,2);
-
- ///////////////////////////////////////////////////////////////////////////////////////////
-
- ///AAR Options
- Composite aarGroup = uiUtils.createComposite(codegenGroup,1);
-
- Text arrGroupLabel= new Text(aarGroup, SWT.READ_ONLY);
- arrGroupLabel.setText(JbossWSUIMessages.LABEL_WEB_SERVICE_AAR);
-
- Composite aarExtGroup = uiUtils.createComposite(aarGroup,2);
-
- //aar extention
- aarExtensionCombo = uiUtils.createCombo(aarExtGroup, JbossWSUIMessages.LABEL_AAR_EXTENTION, null, null, SWT.READ_ONLY );
-
- initializeValues();
- jbosswsPreferenceTab.setEnabled(true);
- jbosswsPreferenceTab.setVisible(true);
- return mainComp;
+ /**
+ * Pops up the file browse dialog box
+ */
+ private void handleBrowse(Shell parent) {
+ DirectoryDialog fileDialog = new DirectoryDialog(parent);
+ String fileName = fileDialog.open();
+ if (fileName != null) {
+ jbosswsPath.setText(fileName);
}
+ }
- public void init(IWorkbench workbench) {
- }
-
-
- /**
- * Pops up the file browse dialog box
- */
- private void handleBrowse(Shell parent) {
- DirectoryDialog fileDialog = new DirectoryDialog(parent);
- String fileName = fileDialog.open();
- if (fileName != null) {
- jbosswsPath.setText(fileName);
- }
- }
-
- private void statusUpdate(boolean status){
- if(statusLabel != null){
- if(!jbosswsPath.getText().equals("")){
- if (status) {
- statusLabel.setText(JbossWSUIMessages.LABEL_JBOSSWS_RUNTIME_LOAD);
- } else {
- statusLabel.setText(JbossWSUIMessages.LABEL_JBOSSWS_RUNTIME_LOAD_ERROR);
- }
- }else{
- statusLabel.setText(JbossWSUIMessages.LABEL_JBOSSWS_RUNTIME_NOT_EXIT);
+ private void statusUpdate(boolean status) {
+ if (statusLabel != null) {
+ if (!jbosswsPath.getText().equals("")) {
+ if (status) {
+ statusLabel
+ .setText(JbossWSUIMessages.LABEL_JBOSSWS_RUNTIME_LOAD);
+ } else {
+ statusLabel
+ .setText(JbossWSUIMessages.LABEL_JBOSSWS_RUNTIME_LOAD_ERROR);
}
+ } else {
+ statusLabel
+ .setText(JbossWSUIMessages.LABEL_JBOSSWS_RUNTIME_NOT_EXIT);
}
}
+ }
- private boolean runtimeExist(String path){
+ private boolean runtimeExist(String path) {
- File jbosswsHomeDir = new File(path);
- if (!jbosswsHomeDir.isDirectory())
- return false;
-
-// String axis2LibPath = Axis2CoreUtils.addAnotherNodeToPath(axis2HomeDir.getAbsolutePath(), "lib");
-// String axis2WebappPath = Axis2CoreUtils.addAnotherNodeToPath(axis2HomeDir.getAbsolutePath(), "webapp");
-// if (new File(axis2LibPath).isDirectory() && new File(axis2WebappPath).isDirectory())
-// return true;
-// else {
-// String axis2WarPath = Axis2CoreUtils.addAnotherNodeToPath( path, "axis2.war");
-// if (new File(axis2WarPath).isFile()) {
-// RuntimePropertyUtils.writeWarStausToPropertiesFile(true);
-// return true;
-// } else
-// return false;
-// }
+ File jbosswsHomeDir = new File(path);
+ if (!jbosswsHomeDir.isDirectory())
+ return false;
+ String[] newNode = {JbossWSUIMessages.BIN, JbossWSUIMessages.COMMOND};
+ String jbosswsBinPath = UIUtils.addNodesToPath(jbosswsHomeDir.getAbsolutePath(), newNode);
+ if(new File(jbosswsBinPath).isFile()){
return true;
}
+ return false;
+ }
- private void storeValues(){
- IPreferenceStore store = this.getPreferenceStore();
- System.out.println(jbosswsPath.getText());
- store.setValue("jbosswsruntimelocation", jbosswsPath.getText());
-
-
-// // set values in the persistent context
-// Axis2EmitterContext context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
-// context.setAxis2RuntimeLocation( axis2Path.getText());
-// RuntimePropertyUtils.writeServerPathToPropertiesFile(axis2Path.getText());
-// context.setServiceDatabinding(serviceDatabindingCombo.getItem(serviceDatabindingCombo.getSelectionIndex()));
-// context.setServiceInterfaceSkeleton( generateServerSideInterfaceCheckBoxButton.getSelection());
-// context.setServiceGenerateAll(generateAllCheckBoxButton.getSelection());
-// context.setAsync(asyncOnlyRadioButton.getSelection());
-// context.setSync(syncOnlyRadioButton.getSelection());
-// context.setClientDatabinding(clientDatabindingCombo.getItem(clientDatabindingCombo.getSelectionIndex()));
-// context.setClientTestCase(clientTestCaseCheckBoxButton.getSelection());
-// context.setClientGenerateAll(clientGenerateAllCheckBoxButton.getSelection());
-// context.setAarExtention(aarExtensionCombo.getText());
- }
+ /**
+ * store the location to the preference
+ */
+ private void storeValues() {
+ IPreferenceStore store = this.getPreferenceStore();
+ System.out.println(jbosswsPath.getText());
+ store.setValue("jbosswsruntimelocation", jbosswsPath.getText());
+ }
- /**
- * Initializes states of the controls using default values
- * in the preference store.
- */
- private void initializeDefaults() {
- IPreferenceStore preferenceStore = getPreferenceStore();
- jbosswsPath.setText(preferenceStore.getDefaultString("jbosswsruntimelocation"));
-// aarExtensionCombo.select(0);
-// serviceDatabindingCombo.select(0);
-// clientDatabindingCombo.select(0);
-// generateServerSideInterfaceCheckBoxButton.setSelection(Axis2EmitterDefaults.isServiceInterfaceSkeleton());
-// generateAllCheckBoxButton.setSelection(Axis2EmitterDefaults.isServiceGenerateAll());
-// syncAndAsyncRadioButton.setSelection(((Axis2EmitterDefaults.isClientSync() || Axis2EmitterDefaults.isClientAsync())==false)?true:
-// (Axis2EmitterDefaults.isClientSync()) && Axis2EmitterDefaults.isClientAsync());
-// syncOnlyRadioButton.setSelection( Axis2EmitterDefaults.isClientSync() && !Axis2EmitterDefaults.isClientAsync());
-// asyncOnlyRadioButton.setSelection(
-// Axis2EmitterDefaults.isClientAsync() && !Axis2EmitterDefaults.isClientSync());
-//
-// clientTestCaseCheckBoxButton.setSelection(Axis2EmitterDefaults.isClientTestCase());
-// clientGenerateAllCheckBoxButton.setSelection(Axis2EmitterDefaults.isClientGenerateAll());
-// axis2Path.setText(Axis2EmitterDefaults.getAxis2RuntimeLocation());
- }
+ /**
+ * Initializes location using default values in the preference store.
+ */
+ private void initializeDefaults() {
+ IPreferenceStore preferenceStore = this.getPreferenceStore();
+ jbosswsPath.setText(preferenceStore
+ .getDefaultString("jbosswsruntimelocation"));
+ }
- private void initializeValues()
- {
- IPreferenceStore preferenceStore = getPreferenceStore();
- jbosswsPath.setText(preferenceStore.getString("jbosswsruntimelocation"));
-// Axis2EmitterContext context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
-//
-// String[] databindingItems = {context.getServiceDatabinding().toUpperCase()};
-// serviceDatabindingCombo.setItems(databindingItems);
-// serviceDatabindingCombo.select(0);
-// clientDatabindingCombo.setItems(databindingItems);
-// clientDatabindingCombo.select(0);
-//
-// generateServerSideInterfaceCheckBoxButton.setSelection( context.isServiceInterfaceSkeleton());
-// generateAllCheckBoxButton.setSelection(context.isServiceGenerateAll());
-//
-// syncAndAsyncRadioButton.setSelection(((context.isSync() || context.isAsync())==false) ?true
-// :(context.isSync()) && context.isAsync());
-// syncOnlyRadioButton.setSelection(context.isSync() && !context.isAsync() );
-// asyncOnlyRadioButton.setSelection(context.isAsync() && !context.isSync());
-//
-// clientTestCaseCheckBoxButton.setSelection(context.isClientTestCase());
-// clientGenerateAllCheckBoxButton.setSelection(context.isClientGenerateAll());
-//
-// String[] aarExtentionItems = { Axis2Constants.AAR };
-// aarExtensionCombo.setItems(aarExtentionItems);
-// aarExtensionCombo.select(0);
-//
-// String serverPath = context.getAxis2RuntimeLocation();
-// if ( serverPath != null){
-// axis2Path.setText(serverPath);
-// statusUpdate(runtimeExist(serverPath));
-// RuntimePropertyUtils.writeWarStausToPropertiesFile(false);
-// }
-// else
-// statusUpdate(false);
- }
+ /**
+ * Initializes the location using default values in the preference
+ */
+ private void initializeValues() {
+ IPreferenceStore preferenceStore = this.getPreferenceStore();
+ jbosswsPath
+ .setText(preferenceStore.getString("jbosswsruntimelocation"));
- /**
- * Default button has been pressed.
- */
- protected void performDefaults() {
- super.performDefaults();
- initializeDefaults();
- }
+ }
- /**
- * Apply button has been pressed.
- */
- protected void performApply() {
- performOk();
- }
+ /**
+ * Default button has been pressed.
+ */
+ protected void performDefaults() {
+ super.performDefaults();
+ initializeDefaults();
+ }
- /**
- * OK button has been pressed.
- */
- public boolean performOk() {
- storeValues();
- return true;
- }
+ /**
+ * Apply button has been pressed.
+ */
+ protected void performApply() {
+ performOk();
+ }
+ /**
+ * OK button has been pressed.
+ */
+ public boolean performOk() {
+ storeValues();
+ return true;
}
+
+}
16 years, 6 months
JBoss Tools SVN: r7696 - in trunk/ws/plugins/org.jboss.tools.ws.core: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-04-23 03:28:39 -0400 (Wed, 23 Apr 2008)
New Revision: 7696
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-04-23 03:10:15 UTC (rev 7695)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-04-23 07:28:39 UTC (rev 7696)
@@ -14,4 +14,6 @@
Eclipse-LazyStart: true
Bundle-Vendor: %PLUGIN_PROVIDER
Export-Package: org.jboss.tools.ws.core,
- org.jboss.tools.ws.core.command
+ org.jboss.tools.ws.core.command,
+ org.jboss.tools.ws.core.facet.delegate,
+ org.jboss.tools.ws.core.utils
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties 2008-04-23 03:10:15 UTC (rev 7695)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties 2008-04-23 07:28:39 UTC (rev 7696)
@@ -1,4 +1,4 @@
-PLUGIN_NAME=JBossWS Core Plug-in
+PLUGIN_NAME=JBossWS Core
PLUGIN_PROVIDER=Red Hat, Inc.
JBOSSWS_CATOGERY_LABEL=JBoss Web Services
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-04-23 03:10:15 UTC (rev 7695)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/JbossWSCoreMessages.java 2008-04-23 07:28:39 UTC (rev 7696)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.ws.core;
import org.eclipse.osgi.util.NLS;
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-04-23 03:10:15 UTC (rev 7695)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-04-23 07:28:39 UTC (rev 7696)
@@ -11,10 +11,6 @@
package org.jboss.tools.ws.core.command;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.commands.ExecutionException;
@@ -26,7 +22,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceStore;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.jboss.tools.ws.core.JbossWSCoreMessages;
import org.jboss.tools.ws.core.JbossWSCorePlugin;
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-04-23 03:10:15 UTC (rev 7695)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-04-23 07:28:39 UTC (rev 7696)
@@ -9,14 +9,12 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-
package org.jboss.tools.ws.core.facet.delegate;
import org.eclipse.core.resources.IProject;
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.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.jboss.tools.ws.core.JbossWSCoreMessages;
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-04-23 03:10:15 UTC (rev 7695)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-04-23 07:28:39 UTC (rev 7696)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.ws.core.utils;
import java.io.File;
@@ -14,7 +25,6 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
16 years, 6 months