Author: Grid.Qian
Date: 2008-04-17 02:23:01 -0400 (Thu, 17 Apr 2008)
New Revision: 7565
Added:
trunk/ws/
trunk/ws/docs/
trunk/ws/features/
trunk/ws/plugins/
trunk/ws/plugins/org.jboss.tools.ws.ui/
trunk/ws/plugins/org.jboss.tools.ws.ui/.classpath
trunk/ws/plugins/org.jboss.tools.ws.ui/.project
trunk/ws/plugins/org.jboss.tools.ws.ui/.settings/
trunk/ws/plugins/org.jboss.tools.ws.ui/.settings/org.eclipse.jdt.core.prefs
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/Activator.class
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUIMessages.class
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/UIUtils.class
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage$1.class
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage$2.class
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.class
trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.ui/src/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/Activator.java
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/UIUtils.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
trunk/ws/tests/
Log:
./qq.log
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/.classpath
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/.classpath (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/.classpath 2008-04-17 06:23:01 UTC (rev 7565)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/.project
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/.project (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/.project 2008-04-17 06:23:01 UTC (rev 7565)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.ws.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/.settings/org.eclipse.jdt.core.prefs 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,7 @@
+#Thu Apr 17 13:45:00 CST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2008-04-17 06:23:01 UTC
(rev 7565)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.jboss.tools.ws.ui;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboss.tools.ws.ui.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources
+Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.ws.ui,
+ org.jboss.tools.ws.ui.preferences
+Bundle-Vendor: %PLUGIN_PROVIDER
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/Activator.class
===================================================================
(Binary files differ)
Property changes on:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/Activator.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUI.properties
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUI.properties 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,38 @@
+LABEL_BROUSE=Browse...
+LABEL_WEB_SERVICE_CODEGEN=Web service code generation options
+LABEL_WEB_SERVICE_CLIENT_CODEGEN=Web service client code generation options
+LABEL_WEB_SERVICE_AAR=Web service archive options
+LABEL_DATABINDING=Default Databinding:
+LABEL_AAR_EXTENTION=AAR default extension:
+LABEL_JBOSSWS_RUNTIME_LOAD=JBossWS runtime loaded successfully
+LABEL_JBOSSWS_RUNTIME_LOAD_ERROR=Error occurred while loading JBossWS runtime. Select the
correct JBossWS runtime folder.
+LABEL_GENERATE_TESTCASE_CAPTION=Generate a JUnit test case to test the service
+LABEL_GENERATE_SERVERSIDE_INTERFACE=Generate an interface for the skeleton
+LABEL_GENERATE_ALL=Generate all types for all elements referred to by schemas
+LABEL_CLIENT_SIDE=Client mode
+LABEL_SYNC_AND_ASYNC=Generate a client which supports both synchronous and asynchronous
invocation
+LABEL_SYNC=Generate a synchronous client
+LABEL_ASYNC=Generate an asynchronous client
+
+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_PREFERENCES_TOOLTIP=Select the default preferences for JBossWS runtime
+JBOSSWS_RUNTIME_LOCATION=JBossWS runtime location:
+JBOSSWS_RUNTIME_PREFERENCES=JBossWS Runtime Preferences
+LABEL_JBOSSWS_RUNTIME_NOT_EXIT=Select the location of the JBossWS binary distribution or
the folder which contains the JBossWS war distribution.
+ERROR_INVALID_JBOSSWS_SERVER_LOCATION=Invalid JBossWS runtime location
+
+ERROR_INVALID_FILE_READ_WRITEL=Exception occurred while reading or writing file {0}
+ERROR_SERVER_IS_NOT_SET=The JBossWS facets cannot be installed since the JBossWS runtime
location has not been set. \nGo to the Web Services preference page and set the JBossWS
runtime location under JBossWS Preferences.
+
+PROGRESS_INSTALL_JBOSSWS_RUNTIME=Installing JBossWS Runtime
+PROGRESS_UNINSTALL_JBOSSWS_RUNTIME=Uninstalling the JBossWS Runtime
+
+DIR_DOT_METADATA=.metadata
+DIR_DOT_PLUGINS=.plugins
+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
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUIMessages.class
===================================================================
(Binary files differ)
Property changes on:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/JbossWSUIMessages.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/UIUtils.class
===================================================================
(Binary files differ)
Property changes on:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/UIUtils.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage$1.class
===================================================================
(Binary files differ)
Property changes on:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage$1.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage$2.class
===================================================================
(Binary files differ)
Property changes on:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage$2.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.class
===================================================================
(Binary files differ)
Property changes on:
trunk/ws/plugins/org.jboss.tools.ws.ui/bin/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties (rev
0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties 2008-04-17 06:23:01 UTC (rev
7565)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties (rev
0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.properties 2008-04-17 06:23:01 UTC (rev
7565)
@@ -0,0 +1,3 @@
+JBOSSWS_PREFERENCE_PAGE=JbossWS Preferences
+PLUGIN_NAME=JbossWS UI
+PLUGIN_PROVIDER=Red Hat, Inc.
\ No newline at end of file
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml 2008-04-17 06:23:01 UTC (rev 7565)
@@ -0,0 +1,10 @@
+<plugin>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ name="%JBOSSWS_PREFERENCE_PAGE"
+ category="org.eclipse.wst.ws.internal.ui.preferences.name"
+
class="org.jboss.tools.ws.ui.preferences.JbossWSRuntimePreferencePage"
+
id="org.jboss.tools.ws.ui.preferences.JbossWSRuntimePreferencePage">
+ </page>
+ </extension>
+</plugin>
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/Activator.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/Activator.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/Activator.java 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,50 @@
+package org.jboss.tools.ws.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ws.ui";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUI.properties 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,38 @@
+LABEL_BROUSE=Browse...
+LABEL_WEB_SERVICE_CODEGEN=Web service code generation options
+LABEL_WEB_SERVICE_CLIENT_CODEGEN=Web service client code generation options
+LABEL_WEB_SERVICE_AAR=Web service archive options
+LABEL_DATABINDING=Default Databinding:
+LABEL_AAR_EXTENTION=AAR default extension:
+LABEL_JBOSSWS_RUNTIME_LOAD=JBossWS runtime loaded successfully
+LABEL_JBOSSWS_RUNTIME_LOAD_ERROR=Error occurred while loading JBossWS runtime. Select the
correct JBossWS runtime folder.
+LABEL_GENERATE_TESTCASE_CAPTION=Generate a JUnit test case to test the service
+LABEL_GENERATE_SERVERSIDE_INTERFACE=Generate an interface for the skeleton
+LABEL_GENERATE_ALL=Generate all types for all elements referred to by schemas
+LABEL_CLIENT_SIDE=Client mode
+LABEL_SYNC_AND_ASYNC=Generate a client which supports both synchronous and asynchronous
invocation
+LABEL_SYNC=Generate a synchronous client
+LABEL_ASYNC=Generate an asynchronous client
+
+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_PREFERENCES_TOOLTIP=Select the default preferences for JBossWS runtime
+JBOSSWS_RUNTIME_LOCATION=JBossWS runtime location:
+JBOSSWS_RUNTIME_PREFERENCES=JBossWS Runtime Preferences
+LABEL_JBOSSWS_RUNTIME_NOT_EXIT=Select the location of the JBossWS binary distribution or
the folder which contains the JBossWS war distribution.
+ERROR_INVALID_JBOSSWS_SERVER_LOCATION=Invalid JBossWS runtime location
+
+ERROR_INVALID_FILE_READ_WRITEL=Exception occurred while reading or writing file {0}
+ERROR_SERVER_IS_NOT_SET=The JBossWS facets cannot be installed since the JBossWS runtime
location has not been set. \nGo to the Web Services preference page and set the JBossWS
runtime location under JBossWS Preferences.
+
+PROGRESS_INSTALL_JBOSSWS_RUNTIME=Installing JBossWS Runtime
+PROGRESS_UNINSTALL_JBOSSWS_RUNTIME=Uninstalling the JBossWS Runtime
+
+DIR_DOT_METADATA=.metadata
+DIR_DOT_PLUGINS=.plugins
+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
Added:
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
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JbossWSUIMessages.java 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.osgi.util.NLS;
+
+public final class JbossWSUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME =
+ "org.jboss.tools.ws.ui.JbossWSUI"; //$NON-NLS-1$
+
+ private JbossWSUIMessages() {
+ // Do not instantiate
+ }
+
+ public static String LABEL_BROUSE;
+ public static String LABEL_WEB_SERVICE_CODEGEN;
+ public static String LABEL_WEB_SERVICE_CLIENT_CODEGEN;
+ public static String LABEL_WEB_SERVICE_AAR;
+ public static String LABEL_AAR_EXTENTION;
+ public static String LABEL_DATABINDING;
+ public static String LABEL_JBOSSWS_RUNTIME_LOAD;
+ public static String LABEL_JBOSSWS_RUNTIME_LOAD_ERROR;
+ public static String LABEL_JBOSSWS_RUNTIME_NOT_EXIT;
+ public static String LABEL_GENERATE_TESTCASE_CAPTION;
+ public static String LABEL_GENERATE_SERVERSIDE_INTERFACE;
+ public static String LABEL_GENERATE_ALL;
+ public static String LABEL_CLIENT_SIDE;
+ public static String LABEL_SYNC_AND_ASYNC;
+ public static String LABEL_SYNC;
+ public static String LABEL_ASYNC;
+
+ public static String JBOSSWS_LOCATION;
+ public static String JBOSSWS_RUNTIME;
+ public static String JBOSSWS_PREFERENCES;
+ public static String JBOSSWS_RUNTIME_TOOLTIP;
+ public static String JBOSSWS_PREFERENCES_TOOLTIP;
+ public static String JBOSSWS_RUNTIME_LOCATION;
+ public static String JBOSSWS_RUNTIME_PREFERENCES;
+
+ public static String ERROR_INVALID_JBOSSWS_SERVER_LOCATION;
+ public static String ERROR_INVALID_FILE_READ_WRITEL;
+ public static String ERROR_SERVER_IS_NOT_SET;
+
+ public static String PROGRESS_INSTALL_JBOSSWS_RUNTIME;
+ public static String PROGRESS_UNINSTALL_JBOSSWS_RUNTIME;
+
+ //generate for jbossws lib
+ public static String DIR_DOT_METADATA;
+ public static String DIR_DOT_PLUGINS;
+ public static String TEMP_JBOSSWS_FACET_DIR;
+ public static String WEBAPP_EXPLODED_SERVER_LOCATION_FILE;
+ public static String SERVER_STATUS_LOCATION_FILE;
+ public static String WAR_STATUS_LOCATION_FILE;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, JbossWSUIMessages.class);
+ }
+}
Added: 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
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/UIUtils.java 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,538 @@
+/*******************************************************************************
+ * 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 java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+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.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.PlatformUI;
+
+public class UIUtils {
+ /**
+ * A default padding value for horizontalResize().
+ */
+ public final static int DEFAULT_PADDING = 35;
+
+ String infoPopid_;
+
+ // verify the jbossws jar directory
+ private static boolean alreadyComputedTempAxis2Directory = false;
+ private static String tempJbosswsDir = null;
+
+ public UIUtils(String infoPopid) {
+ infoPopid_ = infoPopid;
+ }
+
+ public Button createRadioButton(Composite parent, String labelName,
+ String tooltip, String infopop) {
+ return createButton(SWT.RADIO, parent, labelName, tooltip, infopop);
+ }
+
+ public Button createCheckbox(Composite parent, String labelName,
+ String tooltip, String infopop) {
+ return createButton(SWT.CHECK, parent, labelName, tooltip, infopop);
+ }
+
+ public Button createPushButton(Composite parent, String labelName,
+ String tooltip, String infopop) {
+ return createButton(SWT.NONE, parent, labelName, tooltip, infopop);
+ }
+
+ public Button createButton(int kind, Composite parent, String labelName,
+ String tooltip, String infopop) {
+ Button button = new Button(parent, kind);
+
+ tooltip = tooltip == null ? labelName : tooltip;
+ button.setText(labelName);
+ button.setToolTipText(tooltip);
+
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(button,
+ infoPopid_ + "." + infopop);
+
+ return button;
+ }
+
+ public Combo createCombo(Composite parent, String labelName,
+ String tooltip, String infopop, int style) {
+ tooltip = tooltip == null ? labelName : tooltip;
+
+ if (labelName != null) {
+ Label label = new Label(parent, SWT.WRAP);
+ label.setText(labelName);
+ label.setToolTipText(tooltip);
+ }
+
+ Combo combo = new Combo(parent, style);
+ GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL);
+
+ combo.setLayoutData(griddata);
+ combo.setToolTipText(tooltip);
+
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(combo,
+ infoPopid_ + "." + infopop);
+
+ return combo;
+ }
+
+ public Text createText(Composite parent, String labelName, String tooltip,
+ String infopop, int style) {
+ tooltip = tooltip == null ? labelName : tooltip;
+
+ if (labelName != null) {
+ Label label = new Label(parent, SWT.WRAP);
+ label.setText(labelName);
+ label.setToolTipText(tooltip);
+ }
+
+ Text text = new Text(parent, style);
+ GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL);
+
+ text.setLayoutData(griddata);
+ text.setToolTipText(tooltip);
+
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(text,
+ infoPopid_ + "." + infopop);
+
+ return text;
+ }
+
+ public Composite createComposite(Composite parent, int columns) {
+ return createComposite(parent, columns, -1, -1);
+ }
+
+ public Composite createComposite(Composite parent, int columns,
+ int marginHeight, int marginWidth) {
+ Composite composite = new Composite(parent, SWT.NONE);
+
+ GridLayout gridlayout = new GridLayout();
+ gridlayout.numColumns = columns;
+
+ if (marginHeight >= 0)
+ gridlayout.marginHeight = marginHeight;
+ if (marginWidth >= 0)
+ gridlayout.marginWidth = marginWidth;
+
+ composite.setLayout(gridlayout);
+ GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL);
+ composite.setLayoutData(griddata);
+
+ return composite;
+
+ }
+
+ public Group createGroup(Composite parent, String groupName,
+ String tooltip, String infopop) {
+ return createGroup(parent, groupName, tooltip, infopop, 1, -1, -1);
+ }
+
+ public Group createGroup(Composite parent, String groupName,
+ String tooltip, String infopop, int columns, int marginHeight,
+ int marginWidth) {
+ Group newGroup = new Group(parent, SWT.NONE);
+ GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL);
+ GridLayout gridlayout = new GridLayout();
+
+ gridlayout.numColumns = columns;
+
+ if (marginHeight >= 0)
+ gridlayout.marginHeight = marginHeight;
+ if (marginWidth >= 0)
+ gridlayout.marginWidth = marginWidth;
+
+ tooltip = tooltip == null ? groupName : tooltip;
+ newGroup.setLayout(gridlayout);
+ newGroup.setText(groupName);
+ newGroup.setLayoutData(griddata);
+ newGroup.setToolTipText(tooltip);
+
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(newGroup,
+ infoPopid_ + "." + infopop);
+
+ return newGroup;
+ }
+
+ public Tree createTree(Composite parent, String tooltip, String infopop,
+ int style) {
+
+ tooltip = tooltip == null ? "" : tooltip;
+
+ Tree tree = new Tree(parent, style);
+
+ tree.setLayoutData(createFillAll());
+ tree.setToolTipText(tooltip);
+
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(tree,
+ infoPopid_ + "." + infopop);
+
+ return tree;
+
+ }
+
+ public Table createTable(Composite parent, String tooltip, String infopop,
+ int style) {
+
+ tooltip = tooltip == null ? "" : tooltip;
+
+ Table table = new Table(parent, style);
+
+ // table.setLayoutData( createFillAll() );
+ table.setToolTipText(tooltip);
+
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(table,
+ infoPopid_ + "." + infopop);
+
+ return table;
+
+ }
+
+ public Label createHorizontalSeparator(Composite parent, int spacing) {
+ Composite composite = createComposite(parent, 1, spacing, -1);
+
+ Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+
+ GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL);
+ separator.setLayoutData(griddata);
+
+ return separator;
+ }
+
+ public GridData createFillAll() {
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL
+ | GridData.GRAB_VERTICAL);
+ return data;
+ }
+
+ public void createInfoPop(Control ctrl, String infopop) {
+ if (infopop != null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(ctrl,
+ infoPopid_ + "." + infopop);
+ }
+
+ /**
+ * Resizes the width of the target composite so that it is as wide as the
+ * reference composite plus a padding value.
+ *
+ * @param target
+ * The composite to resize.
+ * @param reference
+ * The reference composite
+ * @param padding
+ * The padding value
+ */
+ public void horizontalResize(Composite target, Composite reference,
+ int padding) {
+
+ Point originalSize = target.getSize();
+ Point referenceSize = reference.getSize();
+
+ padding = padding >= 0 ? padding : DEFAULT_PADDING;
+
+ if (referenceSize.x + padding > originalSize.x)
+ target.setSize(referenceSize.x + padding, originalSize.y);
+ }
+
+ //
+ // jboss ws lib copy
+
+ public static String tempAxis2Directory() {
+ if (!alreadyComputedTempAxis2Directory){
+ String[] nodes = {JbossWSUIMessages.DIR_DOT_METADATA,
+ JbossWSUIMessages.DIR_DOT_PLUGINS,
+ JbossWSUIMessages.TEMP_JBOSSWS_FACET_DIR};
+ tempJbosswsDir =addNodesToPath(
+ ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString(), nodes);
+ alreadyComputedTempAxis2Directory= true;
+ }
+ return tempJbosswsDir;
+ }
+
+ public static String tempAxis2WebappFileLocation() {
+ return
+ addAnotherNodeToPath(tempAxis2Directory(),
+ JbossWSUIMessages.WEBAPP_EXPLODED_SERVER_LOCATION_FILE);
+ }
+
+
+ public static String tempRuntimeStatusFileLocation() {
+ return
+ addAnotherNodeToPath(tempAxis2Directory(),
+ JbossWSUIMessages.SERVER_STATUS_LOCATION_FILE);
+ }
+
+ public static String tempWarStatusFileLocation() {
+ return
+ addAnotherNodeToPath(tempAxis2Directory(),
+ JbossWSUIMessages.WAR_STATUS_LOCATION_FILE);
+ }
+
+ public static void writePropertyToFile(File file,String key, String value) throws
IOException {
+ Writer out = new BufferedWriter(new OutputStreamWriter(
+ new FileOutputStream(file), "8859_1"));
+ out.write(key+"="+value+"\n");
+ out.close();
+ }
+
+ // file util
+ public static void copyFile(String src, String dest) {
+ InputStream is = null;
+ FileOutputStream fos = null;
+
+ try
+ {
+ is = new FileInputStream(src);
+ fos = new FileOutputStream(dest);
+ int c = 0;
+ byte[] array = new byte[1024];
+ while ((c = is.read(array)) >= 0){
+ fos.write(array, 0, c);
+ }
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ finally {
+ try {
+ fos.close();
+ is.close();
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public static File createFileAndParentDirectories(String fileName) throws Exception {
+ File file = new File(fileName);
+ File parent = file.getParentFile();
+ if (!parent.exists()){
+ parent.mkdirs();
+ }
+ file.createNewFile();
+ return file;
+ }
+
+ public static boolean deleteDir(File dir) {
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ boolean success = deleteDir(new File(dir, children[i]));
+ if (!success) {
+ return false;
+ }
+ }
+ }
+ return dir.delete();
+ }
+
+ public static void deleteDirectories(File dir) {
+ File[] children = dir.listFiles();
+ for (int i = 0; i < children.length; i++){
+ if (children[i].list() != null && children[i].list().length > 0){
+ deleteDirectories(children[i]);
+ }
+ else{
+ children[i].delete();
+ }
+ }
+ dir.delete();
+ }
+
+ public static void deleteDirectories(String dir) {
+ File directory = new File(dir);
+ deleteDirectories(directory);
+ }
+
+ public static void createTargetFile(String sourceFileName, String targetFileName)
+ throws Exception {
+ createTargetFile(sourceFileName, targetFileName, false);
+ }
+
+ public static void createTargetFile(String sourceFileName, String targetFileName,
+ boolean overwrite) throws Exception{
+ File idealResultFile = new File(targetFileName);
+ if (overwrite || !idealResultFile.exists())
+ {
+ createFileAndParentDirectories(targetFileName);
+ copyFile(sourceFileName, targetFileName);
+ }
+ }
+
+ public static boolean createDirectory(String directory){
+ // Create a directory; all ancestor directories must exist
+ boolean success = (new File(directory)).mkdir();
+ if (!success) {
+ // Directory creation failed
+ }
+ return success;
+ }
+
+ public static boolean createDirectorys(String directory){
+ // Create a directory; all ancestor directories must exist
+ boolean success = (new File(directory)).mkdirs();
+ if (!success) {
+ // Directory creation failed
+ }
+ return success;
+ }
+
+ //Copies all files under srcDir to dstDir.
+ // If dstDir does not exist, it will be created.
+ public static void copyDirectory(File srcDir, File dstDir) throws IOException {
+ if (srcDir.isDirectory()) {
+ if (!dstDir.exists()) {
+ dstDir.mkdir();
+ }
+
+ String[] children = srcDir.list();
+ for (int i=0; i<children.length; i++) {
+ copyDirectory(new File(srcDir, children[i]),
+ new File(dstDir, children[i]));
+ }
+ } else {
+ copy(srcDir, dstDir);
+ }
+ }
+
+ //Copies src file to dst file.
+ // If the dst file does not exist, it is created
+ public static void copy(File src, File dst) throws IOException {
+ InputStream in = new FileInputStream(src);
+ OutputStream out = new FileOutputStream(dst);
+
+ // Transfer bytes from in to out
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ in.close();
+ out.close();
+ }
+
+ public static String addAnotherNodeToPath(String currentPath, String newNode) {
+ return currentPath + File.separator + newNode;
+ }
+
+ public static String addNodesToPath(String currentPath, String[] newNode) {
+ String returnPath=currentPath;
+ for (int i = 0; i < newNode.length; i++) {
+ returnPath = returnPath + File.separator + newNode[i];
+ }
+ return returnPath;
+ }
+
+ public static String addNodesToPath(StringBuffer currentPath, String[] pathNodes) {
+ for (int i = 0; i < pathNodes.length; i++){
+ currentPath.append(File.separator);
+ currentPath.append(pathNodes[i]);
+ }
+ return currentPath.toString();
+ }
+
+ public static String addNodesToURL(String currentPath, String[] newNode) {
+ String returnPath=currentPath;
+ for (int i = 0; i < newNode.length; i++) {
+ returnPath = returnPath + "/" + newNode[i];
+ }
+ return returnPath;
+ }
+
+ /**
+ * Get the list of file with a prefix of <code>fileNamePrefix</code>
& an extension of
+ * <code>extension</code>
+ *
+ * @param sourceDir The directory in which to search the files
+ * @param fileNamePrefix The prefix to look for
+ * @param extension The extension to look for
+ * @return The list of file with a prefix of <code>fileNamePrefix</code>
& an extension of
+ * <code>extension</code>
+ */
+ public static File[] getMatchingFiles(String sourceDir, String fileNamePrefix, String
extension) {
+ List fileList = new ArrayList();
+ File libDir = new File(sourceDir);
+ String libDirPath = libDir.getAbsolutePath();
+ String[] items = libDir.list();
+ if (items != null) {
+ for (int i = 0; i < items.length; i++) {
+ String item = items[i];
+ if (fileNamePrefix != null && extension != null) {
+ if (item.startsWith(fileNamePrefix) &&
item.endsWith(extension)) {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ } else if (fileNamePrefix == null && extension != null) {
+ if (item.endsWith(extension)) {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ } else if (fileNamePrefix != null && extension == null) {
+ if (item.startsWith(fileNamePrefix)) {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ } else {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ }
+ return (File[]) fileList.toArray(new File[fileList.size()]);
+ }
+ return new File[0];
+ }
+
+ /**
+ * Filter out files inside a <code>sourceDir</code> with matching
<codefileNamePrefix></code>
+ * and <code>extension</code>
+ * @param sourceDir The directory to filter the files
+ * @param fileNamePrefix The filtering filename prefix
+ * @param extension The filtering file extension
+ */
+ public static void filterOutRestrictedFiles(String sourceDir, String fileNamePrefix,
String extension){
+ File[] resultedMatchingFiles = getMatchingFiles(sourceDir, fileNamePrefix,
extension);
+ for (int i = 0; i < resultedMatchingFiles.length; i++) {
+ File matchingFilePath = new File(resultedMatchingFiles[i].getAbsolutePath());
+ matchingFilePath.delete();
+ }
+ }
+
+}
\ No newline at end of file
Added:
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
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-04-17
06:23:01 UTC (rev 7565)
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.jface.preference.PreferencePage;
+import org.jboss.tools.ws.ui.UIUtils;
+import org.jboss.tools.ws.ui.Activator;
+import org.jboss.tools.ws.ui.JbossWSUIMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+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.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class JbossWSRuntimePreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
+
+ private Text axis2Path;
+ 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;
+
+ protected Control createContents(Composite superparent) {
+
+ UIUtils uiUtils = new UIUtils(Activator.PLUGIN_ID);
+ final Composite mainComp = uiUtils.createComposite(superparent, 1);
+
+ TabFolder axis2PreferenceTab = new TabFolder(mainComp, SWT.WRAP);
+ axis2PreferenceTab.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL |
GridData.GRAB_VERTICAL | GridData.FILL_BOTH) );
+
+
+ //-----------------------------Axis2 Runtime Location
Group------------------------------//
+ TabItem runtimeInstalLocationItem = new TabItem(axis2PreferenceTab, SWT.WRAP);
+ runtimeInstalLocationItem.setText(JbossWSUIMessages.JBOSSWS_RUNTIME);
+ runtimeInstalLocationItem.setToolTipText(JbossWSUIMessages.JBOSSWS_RUNTIME_TOOLTIP);
+
+ Composite runtimeTab = uiUtils.createComposite(axis2PreferenceTab, 1);
+ runtimeTab.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL |
GridData.GRAB_VERTICAL | GridData.FILL_BOTH ) );
+ Composite runtimeGroup = uiUtils.createComposite(runtimeTab, 3);
+
+ runtimeInstalLocationItem.setControl(runtimeTab);
+ runtimeTab.setToolTipText(JbossWSUIMessages.JBOSSWS_RUNTIME_TOOLTIP);
+
+ axis2Path = 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());
+ }
+ });
+
+ axis2Path.addModifyListener( new ModifyListener(){
+ public void modifyText(ModifyEvent e){
+ statusUpdate(runtimeExist(axis2Path.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) );
+
+ //--------------------------------Axis2 Runtime
Preferences------------------------------//
+
+ TabItem codegenPreferencesItem = new TabItem(axis2PreferenceTab, SWT.WRAP);
+ codegenPreferencesItem.setText(JbossWSUIMessages.JBOSSWS_PREFERENCES);
+ codegenPreferencesItem.setToolTipText(JbossWSUIMessages.JBOSSWS_PREFERENCES_TOOLTIP);
+
+ Composite codegenGroup = uiUtils.createComposite(axis2PreferenceTab, 1);
+ codegenPreferencesItem.setControl(codegenGroup);
+ codegenGroup.setToolTipText(JbossWSUIMessages.JBOSSWS_PREFERENCES_TOOLTIP);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ //Service Codegen Options
+ Composite serviceCodegenGroup = uiUtils.createComposite(codegenGroup, 1);
+
+ Text serviceCodegenGroupLabel= new Text(serviceCodegenGroup, SWT.READ_ONLY
|SWT.WRAP);
+ serviceCodegenGroupLabel.setText(JbossWSUIMessages.LABEL_WEB_SERVICE_CODEGEN);
+
+ Composite dataBindComp = uiUtils.createComposite(serviceCodegenGroup, 2);
+ //Data binding
+ serviceDatabindingCombo = uiUtils.createCombo(dataBindComp,
JbossWSUIMessages.LABEL_DATABINDING, null, null, SWT.READ_ONLY);
+
+ //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();
+ axis2PreferenceTab.setEnabled(true);
+ axis2PreferenceTab.setVisible(true);
+ return mainComp;
+ }
+
+ 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) {
+ axis2Path.setText(fileName);
+ }
+ }
+
+ private void statusUpdate(boolean status){
+ if(statusLabel != null){
+ if(!axis2Path.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){
+
+ File axis2HomeDir = new File(path);
+ if (!axis2HomeDir.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;
+// }
+ return true;
+ }
+
+ private void storeValues(){
+// // 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());
+ }
+
+ /**
+ * Initializes states of the controls using default values
+ * in the preference store.
+ */
+ private void initializeDefaults() {
+// 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());
+ }
+
+ private void initializeValues()
+ {
+// 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);
+ }
+
+ /**
+ * Default button has been pressed.
+ */
+ protected void performDefaults() {
+ super.performDefaults();
+ initializeDefaults();
+ }
+
+ /**
+ * Apply button has been pressed.
+ */
+ protected void performApply() {
+ performOk();
+ }
+
+ /**
+ * OK button has been pressed.
+ */
+ public boolean performOk() {
+ storeValues();
+ return true;
+ }
+
+ }