Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse')
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIMessages.java201
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIPlugin.java77
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties188
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/dialogs/ResourceSelectionDialog.java241
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/preferences/CXFRuntimePreferencePage.java677
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/properties/CXFPropertyPage.java184
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/JavaViewerFilter.java82
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameColumnLabelProvider.java34
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameEditingSupport.java86
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameTableContentProvider.java48
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/AnnotationsComposite.java149
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/BlankRuntimePreferencesComposite.java40
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF20WSDL2JavaPreferencesComposite.java197
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF21WSDL2JavaPreferencesComposite.java264
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSDLRuntimePreferencesComposite.java107
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSRuntimePreferencesComposite.java190
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSWidgetFactory.java422
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/SpringConfigComposite.java89
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/WSDL2JavaWidgetFactory.java623
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFClasspathContainerPage.java182
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFFacetInstallWizardPage.java144
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizard.java46
-rw-r--r--bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizardPage.java364
23 files changed, 0 insertions, 4635 deletions
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIMessages.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIMessages.java
deleted file mode 100644
index b496476..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIMessages.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CXFUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.ws.internal.cxf.ui.CXFUImessages"; //$NON-NLS-1$
- public static String CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_NAME;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_TOOLTIP;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_CXF_HOME_DIR_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_NOT_SET;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_ADD_BUTTON_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_EDIT_BUTTON_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_REMOVE_BUTTON_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_BROWSE_BUTTON_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_CXF_VERSION_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_CXF_TYPE_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_EXPORT_CXF_CLASSPATH_CONTAINER;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_DESCRIPTION_LABEL;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_VERSION_COLUMN_NAME;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_LOCATION_COLUMN_NAME;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_TYPE_COLUMN_NAME;
-
- public static String CXF_RUNTIME_PREFERENCE_PAGE_ENTER_TYPE_NAME;
- public static String CXF_RUNTIME_PREFERENCE_PAGE_INVALID_TYPE_NAME;
-
- public static String CXF_PROPERTY_PAGE_RUNTIME_LABEL;
- public static String CXF_CONFIGURE_INSTALLED_RUNTIMES_LABEL;
-
- public static String CXF_INSTALL_WIZARD_PAGE_TITLE;
- public static String CXF_INSTALL_WIZARD_PAGE_DESCRIPTION;
- public static String CXF_INSTALL_WIZARD_ADD_WINDOW_TITLE;
- public static String CXF_INSTALL_WIZARD_EDIT_WINDOW_TITLE;
-
- public static String CXF_FACET_INSTALL_WIZARD_PAGE_TITLE;
- public static String CXF_FACET_INSTALL_WIZARD_PAGE_DESCRIPTION;
-
- public static String JAVA2WS_PREFERENCES_TAB_NAME;
- public static String JAVA2WS_PREFERENCES_TAB_TOOLTIP;
-
- public static String JAVA2WSDL_PREFERENCES_TAB_NAME;
- public static String JAVA2WSDL_PREFERENCES_TAB_TOOLTIP;
-
- public static String ANNOTATIONS_PREFERENCES_TAB_NAME;
- public static String ANNOTATIONS_PREFERENCES_TAB_TOOLTIP;
-
- public static String WSDL2JAVA_PREFERENCES_TAB_NAME;
- public static String WSDL2JAVA_PREFERENCES_TAB_TOOLTIP;
-
- public static String SPRING_CONFIG_PREFERENCES_TAB_NAME;
- public static String SPRING_CONFIG_PREFERENCES_TAB_TOOLTIP;
-
- public static String ANNOTATIONS_PREFERENCES_LINK;
-
- public static String CXF_DEFAULT_FRONTEND_LABEL;
- public static String CXF_DEFAULT_DATABINDING_LABEL;
- public static String JAVA2WS_GROUP_LABEL;
- public static String JAVA2WSDL_GROUP_LABEL;
- public static String WSDL2JAVA_GROUP_LABEL;
- public static String JAVA2WS_GEN_CLIENT_LABEL;
- public static String JAVA2WS_GEN_SERVER_LABEL;
- public static String JAVA2WS_GEN_IMPLEMENTATION_LABEL;
- public static String JAVA2WS_GEN_WRAPPER_FAULT_LABEL;
- public static String JAVA2WS_GEN_WSDL_LABEL;
- public static String JAVA2WS_DEFAULT_SOAPBINDING_LABEL;
- public static String JAVA2WS_GEN_XSD_IMPORTS;
- public static String CXF_INVALID_VERSION_FORMAT;
- public static String CXF_VERSION_NOT_SPECIFIED;
- public static String SPRING_CONFIG_GROUP_LABEL;
- public static String SPRING_CONFIG_USE_CXF_SERVLET;
- public static String SPRING_CONFIG_USE_CXF_SPRING_APPLICATION_CONTEXT;
- public static String WSDL2JAVA_PROCESS_SOAP_HEADERS;
- public static String WSDL2JAVA_LOAD_DEFAULT_NAMESPACE_PACKAGE_MAPPING;
- public static String WSDL2JAVA_USE_DEFAULT_EXCLUDES_NAMESPACE_MAPPING;
- public static String WSDL2JAVA_WSDL_VERSION_LABEL;
- public static String WSDL2JAVA_USE_DEFAULT_VALUES;
-
- public static String JAXWS_ANNOTATIONS_GROUP_LABEL;
- public static String JAXWS_ANNOTATIONS_GROUP_TOOLTIP;
- public static String JAXWS_GENERATE_WEB_METHOD;
- public static String JAXWS_GENERATE_WEB_PARAM;
- public static String JAXWS_GENERATE_REQUEST_WRAPPER;
- public static String JAXWS_GENERATE_RESPONSE_WRAPPER;
- public static String JAXWS_ANNOTATIONS_PROCESSING_GROUP_LABEL;
- public static String JAXWS_ENABLE_ANNOTATION_PROCESSING;
- public static String JAXWS_ENABLE_ANNOTATION_PROCESSING_TOOLTIP;
-
- public static String JAVA2WS_SOAP12_BINDING_TOOLTIP;
- public static String JAVA2WS_CREATE_XSD_IMPORTS_TOOLTIP;
- public static String JAVA2WS_DATABINDING_TOOLTIP;
- public static String JAVA2WS_FRONTEND_TOOLTIP;
- public static String JAVA2WS_GENERATE_WSDL_TOOLTIP;
- public static String JAVA2WS_GENERATE_WRAPPERBEAN_TOOLTIP;
- public static String JAVA2WS_GENERATE_CLIENT_TOOLTIP;
- public static String JAVA2WS_GENERATE_SERVER_TOOLTIP;
- public static String JAVA2WS_GENERATE_ANT_TOOLTIP;
- public static String JAVA2WS_BEANS_TOOLTIP;
- public static String JAVA2WS_TARGET_NAMESPACE_TOOLTIP;
- public static String JAVA2WS_SERVICE_NAME_TOOLTIP;
- public static String JAVA2WS_PORT_NAME_TOOLTIP;
- public static String JAVA2WS_ADDRESS_TOOLTIP;
-
- public static String JAVA2WS_WSDL_FILE_NAME;
- public static String JAVA2WS_OUTPUT_FILE_TOOLTIP;
-
- public static String JAVA2WS_USE_SEI_BUTTON;
- public static String JAVA2WS_USE_SEI_INFO_LABEL;
-
- public static String JAVA2WS_SELECT_SEI;
- public static String JAVA2WS_SELECT_SEI_LABEL;
- public static String JAVA2WS_SELECT_SEI_TOOLTIP;
- public static String JAVA2WS_BROWSE_LABEL;
- public static String JAVA2WS_EXTRACT_SEI;
- public static String JAVA2WS_EXTRACT_SEI_LABEL;
- public static String JAVA2WS_EXTRACT_SEI_TOOLTIP;
- public static String JAVA2WS_EXTRACT_MEMBERS_LABEL;
-
- public static String JAVA2WS_SELECT_ALL_BUTTON;
- public static String JAVA2WS_DESELECT_ALL_BUTTON;
-
- public static String JAVA2WS_SELECT_IMPLEMENTATION;
- public static String JAVA2WS_SELECT_IMPLEMENTATION_TOOLTIP;
-
- public static String WSDL2JAVA_FRONTEND_TOOLTIP;
- public static String WSDL2JAVA_DATABINDING_TOOLTIP;
- public static String WSDL2JAVA_WSDL_VERSION_TOOLTIP;
- public static String WSDL2JAVA_GENERATE_IMPLEMENTATION_TOOLTIP;
- public static String WSDL2JAVA_GENERATE_CLIENT_TOOLTIP;
- public static String WSDL2JAVA_GENERATE_SERVER_TOOLTIP;
- public static String WSDL2JAVA_DEFAULT_VALUES_TOOLTIP;
- public static String WSDL2JAVA_EXCLUDE_NAMESPACE_TOOLTIP;
- public static String WSDL2JAVA_PROCESS_SOAP_HEADERS_TOOLTIP;
- public static String WSDL2JAVA_DEFAULT_NAMESPACE_LOADING_TOOLTIP;
- public static String WSDL2JAVA_EXCLUDE_NAMESPACE_LOADING_TOOLTIP;
- public static String WSDL2JAVA_WSDL_LOCATION_TOOLTIP;
- public static String WSDL2JAVA_NO_ADDRESS_BINDING;
- public static String WSDL2JAVA_NO_ADDRESS_BINDING_TOOLTIP;
- public static String WSDL2JAVA_AUTO_NAME_RESOLUTION;
- public static String WSDL2JAVA_AUTO_NAME_RESOLUTION_TOOLTIP;
- public static String WSDL2JAVA_XML_CATALOG_TOOLTIP;
- public static String WSDL2JAVA_XJC_ARGS_TOOLTIP;
- public static String WSDL2JAVA_XJC_ARG_GROUP_TITLE;
- public static String WSDL2JAVA_XJC_ARG_COLUMN_NAME;
- public static String WSDL2JAVA_XJC_DESCRIPTION_COLUMN_NAME;
- public static String WSDL2JAVA_XJC_DEFAULT_VALUES;
- public static String WSDL2JAVA_XJC_TOSTRING;
- public static String WSDL2JAVA_XJC_TOSTRING_MULTILINE;
- public static String WSDL2JAVA_XJC_TOSTRING_SIMPLE;
- public static String WSDL2JAVA_XJC_LOCATOR;
- public static String WSDL2JAVA_XJC_SYNC_METHODS;
- public static String WSDL2JAVA_XJC_MARK_GENERATED;
- public static String WSDL2JAVA_XJC_EPISODE_FILE;
-
- public static String RESOURCE_SELECTIN_DIALOG_BROWSE_WORKSPACE_BUTTON;
- public static String RESOURCE_SELECTIN_DIALOG_BROWSE_FILE_SYSTEM_BUTTON;
- public static String RESOURCE_SELECTIN_DIALOG_BROWSE_FILE_NOT_FOUND_ERROR;
-
- public static String WSDL2JAVA_OUTPUT_DIRECTORY;
- public static String WSDL2JAVA_OUTPUT_DIRECTORY_TOOLTIP;
-
- public static String WSDL2JAVA_PACKAGE_NAME;
- public static String WSDL2JAVA_PACKAGE_NAME_TOOLTIP;
-
- public static String WSDL2JAVA_PACKAGE_NAME_OPTIONAL;
- public static String WSDL2JAVA_PACKAGE_NAME_OPTIONAL_TOOLTIP;
-
- public static String WSDL2JAVA_WSDL_NAMESPACE_COLUMN_HEADER;
- public static String WSDL2JAVA_PACKAGE_NAME_COLUMN_HEADER;
-
- public static String WSDL2JAVA_SERVICE_NAME;
- public static String WSDL2JAVA_SERVICE_NAME_TOOLTIP;
-
- public static String WSDL2JAVA_BINDING_FILES;
- public static String WSDL2JAVA_BINDING_NAME_TOOLTIP;
- public static String WSDL2JAVA_BINDING_FILES_ADD;
- public static String WSDL2JAVA_BINDING_FILES_REMOVE;
-
- public static String WSDL2JAVA_BINDING_FILE_DIALOG_TITLE;
- public static String WSDL2JAVA_BINDING_FILE_DIALOG_MESSAGE;
- public static String WSDL2JAVA_BINDING_FILE_DIALOG_FILTER_NAME;
-
- public static String WSDL2JAVA_XML_CATLOG;
- public static String WSDL2JAVA_XML_CATLOG_TOOLTIP;
- public static String WSDL2JAVA_XML_CATLOG_BROWSE;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, CXFUIMessages.class);
- }
-
- private CXFUIMessages() {
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIPlugin.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIPlugin.java
deleted file mode 100644
index 2d12299..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUIPlugin.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- */
-public class CXFUIPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.jst.ws.cxf.ui"; //$NON-NLS-1$
-
- // The shared instance
- private static CXFUIPlugin plugin;
-
- /**
- * The constructor
- */
- public CXFUIPlugin() {
- }
-
- /*
- * (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 CXFUIPlugin getDefault() {
- return plugin;
- }
-
- public static void logMessage(int severity, String message) {
- CXFUIPlugin.log(new Status(severity, CXFUIPlugin.PLUGIN_ID, message));
- }
-
- public static void log(IStatus status) {
- CXFUIPlugin.getDefault().getLog().log(status);
- }
-
- public static void log(Throwable exception) {
- CXFUIPlugin.log(new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID,
- exception.toString(), exception));
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties
deleted file mode 100644
index f4f323e..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties
+++ /dev/null
@@ -1,188 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 IONA Technologies PLC
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IONA Technologies PLC - initial API and implementation
-###############################################################################
-
-#CXF Preference Pages
-CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_NAME=&CXF Runtime
-CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_TOOLTIP=Browse and select CXF Binary distribution folder
-CXF_RUNTIME_PREFERENCE_PAGE_CXF_HOME_DIR_LABEL=CXF &home:
-CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_NOT_SET=Missing CXF jar: Please select the CXF home directory.
-CXF_RUNTIME_PREFERENCE_PAGE_ADD_BUTTON_LABEL=&Add...
-CXF_RUNTIME_PREFERENCE_PAGE_EDIT_BUTTON_LABEL=E&dit...
-CXF_RUNTIME_PREFERENCE_PAGE_REMOVE_BUTTON_LABEL=&Remove
-CXF_RUNTIME_PREFERENCE_PAGE_BROWSE_BUTTON_LABEL=&Browse...
-CXF_RUNTIME_PREFERENCE_PAGE_CXF_VERSION_LABEL=&Version:
-CXF_RUNTIME_PREFERENCE_PAGE_CXF_TYPE_LABEL=&Type:
-CXF_RUNTIME_PREFERENCE_PAGE_EXPORT_CXF_CLASSPATH_CONTAINER=Ex&port runtime libraries to WEB-INF/lib at deployment time
-CXF_RUNTIME_PREFERENCE_PAGE_DESCRIPTION_LABEL=Add, remove or edit CXF runtimes. By default, the checked CXF runtime is added to the build path of a project when installing the CXF facet.
-CXF_RUNTIME_PREFERENCE_PAGE_VERSION_COLUMN_NAME=Version
-CXF_RUNTIME_PREFERENCE_PAGE_LOCATION_COLUMN_NAME=Location
-CXF_RUNTIME_PREFERENCE_PAGE_TYPE_COLUMN_NAME=Type
-CXF_RUNTIME_PREFERENCE_PAGE_ENTER_TYPE_NAME=Enter type name
-CXF_RUNTIME_PREFERENCE_PAGE_INVALID_TYPE_NAME=Invalid type name: {0}
-CXF_PROPERTY_PAGE_RUNTIME_LABEL=C&XF runtime:
-CXF_CONFIGURE_INSTALLED_RUNTIMES_LABEL=<A>Configure installed runtimes</A>
-
-CXF_INSTALL_WIZARD_PAGE_TITLE=CXF Runtime
-CXF_INSTALL_WIZARD_PAGE_DESCRIPTION=Specify the home directory of the CXF runtime.
-CXF_INSTALL_WIZARD_ADD_WINDOW_TITLE=Add CXF Runtime
-CXF_INSTALL_WIZARD_EDIT_WINDOW_TITLE=Edit CXF Runtime
-
-CXF_FACET_INSTALL_WIZARD_PAGE_TITLE=CXF Facet
-CXF_FACET_INSTALL_WIZARD_PAGE_DESCRIPTION=Configure the CXF facet settings.
-
-JAVA2WSDL_PREFERENCES_TAB_NAME=Java2WSDL
-JAVA2WSDL_PREFERENCES_TAB_TOOLTIP=Please select the default preferences for the Java2WSDL tool
-
-JAVA2WS_PREFERENCES_TAB_NAME=&Java2WS
-JAVA2WS_PREFERENCES_TAB_TOOLTIP=Please select the default preferences for the Java2WS tool
-
-ANNOTATIONS_PREFERENCES_LINK=See the <A>'JAX-WS'</A> tab for the annotation preferences.
-
-ANNOTATIONS_PREFERENCES_TAB_NAME=JA&X-WS
-ANNOTATIONS_PREFERENCES_TAB_TOOLTIP=Please select the JAX-WS annotations that are generated by default on the class or interface before input to Java2WS
-
-WSDL2JAVA_PREFERENCES_TAB_NAME=&WSDL2Java
-WSDL2JAVA_PREFERENCES_TAB_TOOLTIP=Please select the default preferences for the WSDL2Java tool
-
-SPRING_CONFIG_PREFERENCES_TAB_NAME=E&ndpoint Config
-SPRING_CONFIG_PREFERENCES_TAB_TOOLTIP=Please select the default option for Spring configuration generation
-SPRING_CONFIG_USE_CXF_SERVLET=Use CX&F Servlet
-SPRING_CONFIG_USE_CXF_SPRING_APPLICATION_CONTEXT=Use Spring &Application Context
-
-CXF_DEFAULT_FRONTEND_LABEL=Default &Frontend:
-CXF_DEFAULT_DATABINDING_LABEL=Default &Databindng:
-JAVA2WS_GROUP_LABEL=Java2WS Generation Options:
-JAVA2WSDL_GROUP_LABEL=Java2WSDL Generation Options:
-WSDL2JAVA_GROUP_LABEL=WSDL2Java Generation Options:
-JAVA2WS_GEN_CLIENT_LABEL=&Generate Client
-JAVA2WS_GEN_SERVER_LABEL=Generate Ser&ver
-JAVA2WS_GEN_IMPLEMENTATION_LABEL=Generate &Implementation
-JAVA2WS_GEN_WRAPPER_FAULT_LABEL=Generate Wrapper and Fault &Beans
-JAVA2WS_GEN_WSDL_LABEL=Generate WSD&L
-JAVA2WS_DEFAULT_SOAPBINDING_LABEL=Default S&OAP Binding:
-JAVA2WS_GEN_XSD_IMPORTS=Generate separate XSD for the &types
-CXF_INVALID_VERSION_FORMAT=Invalid Version Format
-CXF_VERSION_NOT_SPECIFIED=CXF version value not specified
-SPRING_CONFIG_GROUP_LABEL=CXF Endpoint Configuration Options:
-WSDL2JAVA_PROCESS_SOAP_HEADERS=Enable &processing of implicit SOAP headers
-WSDL2JAVA_LOAD_DEFAULT_NAMESPACE_PACKAGE_MAPPING=Enable &loading of the default namespace package name mapping
-WSDL2JAVA_USE_DEFAULT_EXCLUDES_NAMESPACE_MAPPING=Enable the use of the default &excludes namespace mapping
-WSDL2JAVA_WSDL_VERSION_LABEL=WSDL Version:
-WSDL2JAVA_USE_DEFAULT_VALUES=Generate &default values for the generated artifacts
-
-JAXWS_ANNOTATIONS_GROUP_LABEL=JAX-WS Annotation Generation
-JAXWS_ANNOTATIONS_GROUP_TOOLTIP=Select the annotations which are generated by default on the class or interface before input to Java2WS
-JAXWS_GENERATE_WEB_METHOD=@Web&Method
-JAXWS_GENERATE_WEB_PARAM=@Web&Param
-JAXWS_GENERATE_REQUEST_WRAPPER=@Re&questWrapper
-JAXWS_GENERATE_RESPONSE_WRAPPER=@&ResponseWrapper
-JAXWS_ANNOTATIONS_PROCESSING_GROUP_LABEL=JAX-WS Annotation Processing
-JAXWS_ENABLE_ANNOTATION_PROCESSING=&Enable annotation validation processing
-JAXWS_ENABLE_ANNOTATION_PROCESSING_TOOLTIP=Turn JAX-WS annotation processing on or off in projects configured for {0} web services
-
-JAVA2WS_SOAP12_BINDING_TOOLTIP=Specify to generate SOAP 1.2 binding
-JAVA2WS_CREATE_XSD_IMPORTS_TOOLTIP= Output schemas to separate files and use imports to load them instead of inlining them into the wsdl
-JAVA2WS_DATABINDING_TOOLTIP= Specify the data binding. Default is jaxb for jaxws frontend
-#JAVA2WS_DATABINDING_TOOLTIP= Specify the data binding (aegis or jaxb). Default is jaxb for jaxws frontend, and aegis for simple frontend
-JAVA2WS_FRONTEND_TOOLTIP=Specify the frontend to use
-#JAVA2WS_FRONTEND_TOOLTIP=Specify the frontend to use. jaxws and the simple frontend are supported
-JAVA2WS_GENERATE_WSDL_TOOLTIP=Specify to generate the WSDL file
-JAVA2WS_GENERATE_WRAPPERBEAN_TOOLTIP=Specify to generate the wrapper and fault bean
-JAVA2WS_GENERATE_CLIENT_TOOLTIP=Generate a client mainline using JAX-WS APIs\n.....\n javax.xml.ws.Service service = javax.xml.ws.Service.create(...);\n... client = service.getPort(...);\n
-JAVA2WS_GENERATE_SERVER_TOOLTIP=Generate a server mainline using JAX-WS APIs\n.....\n javax.xml.ws.Endpoint.publish(...);\n.....\n
-JAVA2WS_GENERATE_ANT_TOOLTIP=Specify to generate an Ant build.xml file
-JAVA2WS_BEANS_TOOLTIP=Specify the pathname of a file defining additional Spring beans to customise data binding configuration
-JAVA2WS_TARGET_NAMESPACE_TOOLTIP=Specify the target namespace to use in the wsdl
-JAVA2WS_SERVICE_NAME_TOOLTIP=Specify the service name to use in the generated wsdl
-JAVA2WS_PORT_NAME_TOOLTIP=Specify the port name to use in the generated wsdl
-JAVA2WS_ADDRESS_TOOLTIP= Specify the port address
-
-JAVA2WS_WSDL_FILE_NAME=&WSDL File:
-JAVA2WS_OUTPUT_FILE_TOOLTIP=Specify the output wsdl file name
-
-JAVA2WS_USE_SEI_BUTTON=&Use a Service Endpoint Interface:
-JAVA2WS_USE_SEI_INFO_LABEL=(You may work directly with the {0} Java class. But working from an interface is the recommended approach. Two options are provided here.)
-JAVA2WS_SELECT_SEI=Select SEI:
-#JAVA2WS_SELECT_SEI_LABEL=Select SEI from &Type Hierarchy:
-JAVA2WS_SELECT_SEI_LABEL=Selec&t an SEI:
-JAVA2WS_SELECT_SEI_TOOLTIP=Select the Interface from the Type Hierarchy to use as the SEI
-JAVA2WS_BROWSE_LABEL=Bro&wse...
-JAVA2WS_EXTRACT_SEI=Extract SEI:
-JAVA2WS_EXTRACT_SEI_LABEL=&Create an SEI:
-JAVA2WS_EXTRACT_SEI_TOOLTIP=Type the name of the Service Endpoint Interface to extract
-JAVA2WS_EXTRACT_MEMBERS_LABEL=Members to declare in the extracted SEI:
-JAVA2WS_SELECT_ALL_BUTTON=&Select All...
-JAVA2WS_DESELECT_ALL_BUTTON=&Deselect All...
-JAVA2WS_SELECT_IMPLEMENTATION=Select &Implementation:
-JAVA2WS_SELECT_IMPLEMENTATION_TOOLTIP=Select the Implementation
-
-WSDL2JAVA_FRONTEND_TOOLTIP=Specify the frontend. Default is JAXWS. Currently supports only JAXWS frontend
-WSDL2JAVA_DATABINDING_TOOLTIP=Specify the databinding. Default is JAXB. Currently supports only JAXB databinding
-WSDL2JAVA_WSDL_VERSION_TOOLTIP=Specify the wsdl version .Default is WSDL1.1. Currently supports only WSDL1.1 version
-WSDL2JAVA_GENERATE_IMPLEMENTATION_TOOLTIP=Generate starting point code for an implementation object
-WSDL2JAVA_GENERATE_CLIENT_TOOLTIP=Generate the client code
-WSDL2JAVA_GENERATE_SERVER_TOOLTIP=Generate the server code
-WSDL2JAVA_DEFAULT_VALUES_TOOLTIP=Generate default values in the implementation and client. Ignored if implementation or client is not being generated
-WSDL2JAVA_EXCLUDE_NAMESPACE_TOOLTIP=Ignore the specified WSDL schema namespaces when generating code
-WSDL2JAVA_PROCESS_SOAP_HEADERS_TOOLTIP=Enables or disables processing of extended soap header message binding
-WSDL2JAVA_DEFAULT_NAMESPACE_LOADING_TOOLTIP=Enables or disables loading of the default namespace package name mapping
-WSDL2JAVA_EXCLUDE_NAMESPACE_LOADING_TOOLTIP=Enables or disables loading of the default excludes namespace mapping
-WSDL2JAVA_WSDL_LOCATION_TOOLTIP=Specifies the value of the @WebService annotation's wsdlLocation property
-WSDL2JAVA_XML_CATALOG_TOOLTIP=Specify the URL of an XML catalog to use for resolving imported schemas and WSDL documents
-WSDL2JAVA_NO_ADDRESS_BINDING=Use the {0} proprietary WS-&Addressing type
-WSDL2JAVA_NO_ADDRESS_BINDING_TOOLTIP=Use the {0} proprietary WS-Addressing type instead of the JAX-WS 2.1 compliant mapping
-WSDL2JAVA_AUTO_NAME_RESOLUTION=Enable Auto Name &Resolution
-WSDL2JAVA_AUTO_NAME_RESOLUTION_TOOLTIP=Automatically resolve naming conflicts without requiring the use of binding customizations
-WSDL2JAVA_XJC_ARGS_TOOLTIP=Specify the arguments to be passed directly to the XJC
-WSDL2JAVA_XJC_ARG_GROUP_TITLE=XJC Arguments
-WSDL2JAVA_XJC_ARG_COLUMN_NAME=XJC Arg
-WSDL2JAVA_XJC_DESCRIPTION_COLUMN_NAME=Description
-WSDL2JAVA_XJC_DEFAULT_VALUES=Initialise fields mapped from elements with their default values
-WSDL2JAVA_XJC_TOSTRING=Activate plugin to add a toString() method to generated classes
-WSDL2JAVA_XJC_TOSTRING_MULTILINE=Have toString produce multi line output
-WSDL2JAVA_XJC_TOSTRING_SIMPLE=Have toString produce single line terse output
-WSDL2JAVA_XJC_LOCATOR=Enable source location support for generated code
-WSDL2JAVA_XJC_SYNC_METHODS=Generate accessor methods with the 'synchronized' keyword
-WSDL2JAVA_XJC_MARK_GENERATED=Add @Generated annotations to the generated code
-#Mark the generated code as @javax.annotation.Generated
-WSDL2JAVA_XJC_EPISODE_FILE= Generate the episode file for separate compilation
-#Resource Selection Dialog
-RESOURCE_SELECTIN_DIALOG_BROWSE_WORKSPACE_BUTTON=Browse &Workspace...
-RESOURCE_SELECTIN_DIALOG_BROWSE_FILE_SYSTEM_BUTTON=Browse &File System...
-RESOURCE_SELECTIN_DIALOG_BROWSE_FILE_NOT_FOUND_ERROR=File Not Found
-
-WSDL2JAVA_OUTPUT_DIRECTORY=&Output Directory:
-WSDL2JAVA_OUTPUT_DIRECTORY_TOOLTIP=Specify the directory into which the generated code files are written
-
-WSDL2JAVA_PACKAGE_NAME=&Package Name:
-WSDL2JAVA_PACKAGE_NAME_TOOLTIP=The java package name to use for the generated code
-
-WSDL2JAVA_PACKAGE_NAME_OPTIONAL=Specify &WSDL Namepsace to Package Name Mappings
-WSDL2JAVA_PACKAGE_NAME_OPTIONAL_TOOLTIP=Optionally specify the wsdl namespace mapping to a particular java package name
-
-WSDL2JAVA_WSDL_NAMESPACE_COLUMN_HEADER=WSDL Namespace
-WSDL2JAVA_PACKAGE_NAME_COLUMN_HEADER=Package Name
-
-WSDL2JAVA_SERVICE_NAME=&Service Name:
-WSDL2JAVA_SERVICE_NAME_TOOLTIP=Specify the name of the WSDL service for which code is to be generated. The default is to generate code for every service in the WSDL document
-
-WSDL2JAVA_BINDING_FILES=&Binding Files:
-WSDL2JAVA_BINDING_NAME_TOOLTIP=Specify zero, or more, JAXWS or JAXB binding files
-WSDL2JAVA_BINDING_FILES_ADD=&Add...
-WSDL2JAVA_BINDING_FILES_REMOVE=&Remove...
-
-WSDL2JAVA_BINDING_FILE_DIALOG_TITLE=Browse for Binding File
-WSDL2JAVA_BINDING_FILE_DIALOG_MESSAGE=Binding File:
-WSDL2JAVA_BINDING_FILE_DIALOG_FILTER_NAME=JAXWS or JAXB Binding Files (*.xml)
-
-WSDL2JAVA_XML_CATLOG=XML Catalog:
-WSDL2JAVA_XML_CATLOG_TOOLTIP=Specify catalog file to map the imported wsdl/schema
-WSDL2JAVA_XML_CATLOG_BROWSE=Browse...
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/dialogs/ResourceSelectionDialog.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/dialogs/ResourceSelectionDialog.java
deleted file mode 100644
index 9befcd1..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/dialogs/ResourceSelectionDialog.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.dialogs;
-
-import java.io.File;
-import java.util.Arrays;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-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.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.dialogs.SelectionDialog;
-import org.eclipse.ui.dialogs.SelectionStatusDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * A <code>SelectionStatusDialog</code> which allows the selection of files
- * with a specific extension from the workspace or file system.
- *
- */
-public class ResourceSelectionDialog extends SelectionStatusDialog {
- private IStatus OK_FILE_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
-
- private IStatus ERROR_FILE_STATUS = new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID,
- CXFUIMessages.RESOURCE_SELECTIN_DIALOG_BROWSE_FILE_NOT_FOUND_ERROR);
-
- private IStatus VALIDATE_SELECTION_STATUS = new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
-
- private Text resourceText;
-
- private String filterExtension;
- private String filterName;
-
- /**
- * Creates an instance of <code>ResourceSelectionDialog</code>
- *
- * @param parent
- * @param filterExtension
- * the file name extension which the dialogs will use to filter
- * files
- * @param filterName
- * the name that describes the filterExtension
- * @param dialogTitle
- * the dialog title
- */
- public ResourceSelectionDialog(Shell parent, String filterExtension, String filterName, String dialogTitle) {
- super(parent);
-
- this.filterExtension = filterExtension;
- this.filterName = filterName;
-
- setTitle(dialogTitle);
- setStatusLineAboveButtons(true);
- int shellStyle = getShellStyle();
- setShellStyle(shellStyle | SWT.MAX | SWT.RESIZE);
- updateStatus(VALIDATE_SELECTION_STATUS);
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- final Composite composite = (Composite) super.createDialogArea(parent);
-
- Composite buttonComposite = new Composite(composite, SWT.NONE);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.widthHint = 500;
- buttonComposite.setLayoutData(gridData);
-
- GridLayout gridLayout = new GridLayout(3, false);
- buttonComposite.setLayout(gridLayout);
-
- Label messageLabel = createMessageArea(buttonComposite);
- gridData = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
- messageLabel.setLayoutData(gridData);
-
- Button browseWorkspace = new Button(buttonComposite, SWT.PUSH);
- browseWorkspace.setText(CXFUIMessages.RESOURCE_SELECTIN_DIALOG_BROWSE_WORKSPACE_BUTTON);
- browseWorkspace.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- SelectionDialog dialog = createWorkspaceResourceDialog(composite.getShell());
- if (dialog.open() == SelectionDialog.OK) {
- Object[] result = dialog.getResult();
- IResource resource = (IResource) result[0];
- resourceText.setText(resource.getLocation().toOSString());
- }
- }
- });
-
- gridData = new GridData(SWT.END, SWT.FILL, false, false);
- browseWorkspace.setLayoutData(gridData);
-
- Button browseFileSystem = new Button(buttonComposite, SWT.PUSH);
- browseFileSystem.setText(CXFUIMessages.RESOURCE_SELECTIN_DIALOG_BROWSE_FILE_SYSTEM_BUTTON);
- browseFileSystem.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- FileDialog dialog = createFileSystemResourceDialog(composite.getShell());
- String result = dialog.open();
- if (result == null) {
- return;
- }
- IPath filterPath = new Path(dialog.getFilterPath());
- String buildFileName = dialog.getFileName();
- IPath path = filterPath.append(buildFileName).makeAbsolute();
-
- resourceText.setText(path.toOSString());
- }
- });
- gridData = new GridData(SWT.END, SWT.FILL, false, false);
- browseFileSystem.setLayoutData(gridData);
-
- resourceText = new Text(buttonComposite, SWT.BORDER);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- resourceText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent event) {
- String resource = resourceText.getText();
- File file = new File(resource);
- if (file.exists()) {
- setResult(Arrays.asList(resource));
- updateStatus(OK_FILE_STATUS);
- } else {
- updateStatus(ERROR_FILE_STATUS);
- }
- }
- });
- gridData.horizontalSpan = 3;
- resourceText.setLayoutData(gridData);
-
- return composite;
- }
-
- private SelectionDialog createWorkspaceResourceDialog(Shell shell) {
- ElementTreeSelectionDialog workspaceResourceDialog = new ElementTreeSelectionDialog(shell,
- new WorkbenchLabelProvider(), new WorkbenchContentProvider());
-
- workspaceResourceDialog.setTitle(getMessage());
- workspaceResourceDialog.setMessage(filterName);
- workspaceResourceDialog.setAllowMultiple(false);
-
- workspaceResourceDialog.addFilter(new ViewerFilter() {
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof IFile) {
- IFile file = (IFile) element;
- return file.isAccessible() && file.getFileExtension().equals(filterExtension);
- }
-
- if (element instanceof IProject && !((IProject) element).isOpen()) {
- IProject project = (IProject) element;
- return project.isAccessible();
- }
-
- if (element instanceof IContainer) {
- try {
- IContainer container = (IContainer) element;
- IResource[] resources = container.members();
- for (IResource resource : resources) {
- if (select(viewer, parentElement, resource)) {
- return true;
- }
- }
- } catch (CoreException ce) {
- CXFUIPlugin.log(ce.getStatus());
- }
- }
- return false;
- }
- });
-
- workspaceResourceDialog.setValidator(new ISelectionStatusValidator() {
-
- public IStatus validate(Object[] selection) {
- if (selection.length > 0) {
- Object selected = selection[0];
- if (selected instanceof IFile) {
- IFile file = (IFile) selected;
- if (file.getFileExtension().equals(filterExtension)) {
- return OK_FILE_STATUS;
- }
- }
- }
- return VALIDATE_SELECTION_STATUS;
- }
- });
-
- workspaceResourceDialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
-
- return workspaceResourceDialog;
- }
-
- private FileDialog createFileSystemResourceDialog(Shell shell) {
- FileDialog dialog = new FileDialog(shell, SWT.OPEN);
- dialog.setFilterExtensions(new String[] { "*" + filterExtension }); //$NON-NLS-1$;
- dialog.setFilterNames(new String[] { filterName });
- return dialog;
- }
-
- @Override
- protected void computeResult() {
- // do nothing
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/preferences/CXFRuntimePreferencePage.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/preferences/CXFRuntimePreferencePage.java
deleted file mode 100644
index c38f3c5..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/preferences/CXFRuntimePreferencePage.java
+++ /dev/null
@@ -1,677 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.preferences;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFInstall;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.AnnotationsComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.BlankRuntimePreferencesComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.CXF20WSDL2JavaPreferencesComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.CXF21WSDL2JavaPreferencesComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.Java2WSDLRuntimePreferencesComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.Java2WSRuntimePreferencesComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.widgets.SpringConfigComposite;
-import org.eclipse.jst.ws.internal.cxf.ui.wizards.CXFInstallWizard;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class CXFRuntimePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- // private IStatus CXF_LOCATION_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, null);
- // private IStatus OK_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
- //
- private ISelection previousInstall = new StructuredSelection();
-
- private Button addButton;
- private Button editButton;
- private Button removeButton;
-
- private CheckboxTableViewer cxfInstallations;
-
- private Button exportCXFClasspathContainerButton;
-
- private CXFContext context;
-
- private Java2WSDLRuntimePreferencesComposite java2WSDLRuntimePreferencesComposite;
- private Java2WSRuntimePreferencesComposite java2WSRuntimePreferencesComposite ;
-
- private CXF20WSDL2JavaPreferencesComposite cxf20WSDL2JavaPreferencesComposite;
- private CXF21WSDL2JavaPreferencesComposite cxf21WSDL2JavaPreferencesComposite;
-
- private AnnotationsComposite annotationsComposite;
-
- private SpringConfigComposite springConfigComposite;
-
- private StackLayout java2WSStackLayout;
- private StackLayout wsdl2javaStackLayout;
- private StackLayout jaxwsStackLayout;
- private StackLayout springConfigStackLayout;
-
- private Composite java2WSPreferncesGroup;
- private Composite wsdl2JavaPreferencesGroup;
- private Composite jaxwsPreferencesGroup;
- private Composite springConfigPreferncesGroup;
-
- private Composite java2WSDLPreferencesComposite;
- private Composite java2WSPreferencesComposite;
-
- private Composite jaxwsPreferencesComposite;
-
- private Composite wsdl2Java20PreferencesComposite;
- private Composite wsdl2Java21PreferencesComposite;
-
- private Composite springPreferencesComposite;
-
- private BlankRuntimePreferencesComposite java2WSBlankPreferencesComposite;
- private BlankRuntimePreferencesComposite wsdl2JavaBlankPreferencesComposite;
- private BlankRuntimePreferencesComposite jaxwsBlankPreferencesComposite;
- private BlankRuntimePreferencesComposite springConfigBlankPreferencesComposite;
-
- private Image libraryImage;
-
- public CXFRuntimePreferencePage() {
- libraryImage = CXFUIPlugin.imageDescriptorFromPlugin(CXFUIPlugin.PLUGIN_ID, "icons/obj16/library_obj.gif").createImage(); //$NON-NLS-1$
- }
-
- public void init(IWorkbench workbench) {
- }
-
- @Override
- protected Control createContents(Composite parent) {
- context = CXFCorePlugin.getDefault().getJava2WSContext();
-
- final Composite composite = new Composite(parent, SWT.NONE);
-
- GridLayout mainLayout = new GridLayout();
- composite.setLayout(mainLayout);
- GridData gridData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gridData);
-
- TabFolder cxfPreferenceTab = new TabFolder(composite, SWT.NONE);
- gridData = new GridData(GridData.FILL_BOTH);
- cxfPreferenceTab.setLayoutData(gridData);
-
- //CXF Runtime Location
- TabItem runtimeInstalLocationItem = new TabItem(cxfPreferenceTab, SWT.NONE);
- runtimeInstalLocationItem.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_NAME);
- runtimeInstalLocationItem.setToolTipText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_TOOLTIP);
-
- final Composite runtimeGroup = new Composite(cxfPreferenceTab, SWT.NONE);
-
- runtimeInstalLocationItem.setControl(runtimeGroup);
- runtimeGroup.setToolTipText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_HOME_TAB_TOOLTIP);
-
- GridLayout runtimeLoactionlayout = new GridLayout();
- runtimeLoactionlayout.numColumns = 3;
- runtimeLoactionlayout.marginHeight = 10;
- runtimeGroup.setLayout(runtimeLoactionlayout);
- gridData = new GridData(GridData.FILL_BOTH);
- runtimeGroup.setLayoutData(gridData);
-
- Label runtimeTabDescriptionLabel = new Label(runtimeGroup, SWT.WRAP);
- runtimeTabDescriptionLabel.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_DESCRIPTION_LABEL);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
-
- gridData.horizontalSpan = 3;
- gridData.widthHint = 300;
- runtimeTabDescriptionLabel.setLayoutData(gridData);
-
- Table installTable = new Table(runtimeGroup, SWT.CHECK | SWT.MULTI | SWT.BORDER
- | SWT.FULL_SELECTION);
- installTable.setLinesVisible(true);
- installTable.setHeaderVisible(true);
-
- TableLayout tableLayout = new TableLayout();
- installTable.setLayout(tableLayout);
-
- cxfInstallations = new CheckboxTableViewer(installTable);
- cxfInstallations.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- setCheckedInstall(event.getElement());
- } else {
- setCheckedInstall(null);
- }
- }
- });
-
- cxfInstallations.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- int noElements = selection.size();
- if (noElements > 1) {
- editButton.setEnabled(false);
- } else {
- editButton.setEnabled(true);
- }
- removeButton.setEnabled(!selection.isEmpty());
- }
- });
- TableViewerColumn versionViewerColumn = new TableViewerColumn(cxfInstallations, SWT.LEFT);
- versionViewerColumn.setLabelProvider(new ColumnLabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof CXFInstall) {
- CXFInstall install = (CXFInstall) element;
- String version = install.getVersion().toString().trim();
- return version;
- }
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public Image getImage(Object element) {
- if (element instanceof CXFInstall) {
- return libraryImage;
- }
- return null;
- }
- });
- TableColumn versionColumn = versionViewerColumn.getColumn();
- versionColumn.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_VERSION_COLUMN_NAME);
- versionColumn.pack();
-
- ColumnWeightData columnWeightData = new ColumnWeightData(50, 50, true);
- tableLayout.addColumnData(columnWeightData);
-
- TableViewerColumn locationViewerColumn = new TableViewerColumn(cxfInstallations, SWT.LEFT);
- locationViewerColumn.setLabelProvider(new ColumnLabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof CXFInstall) {
- CXFInstall install = (CXFInstall) element;
- return install.getLocation().toString().trim();
- }
- return ""; //$NON-NLS-1$
- }
- });
-
- TableColumn locationColumn = locationViewerColumn.getColumn();
- locationColumn.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_LOCATION_COLUMN_NAME);
- locationColumn.pack();
-
- columnWeightData = new ColumnWeightData(50, 150, true);
- tableLayout.addColumnData(columnWeightData);
-
- TableViewerColumn typeViewerColumn = new TableViewerColumn(cxfInstallations, SWT.LEFT);
- typeViewerColumn.setLabelProvider(new ColumnLabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof CXFInstall) {
- CXFInstall install = (CXFInstall) element;
- return install.getType().toString().trim();
- }
- return ""; //$NON-NLS-1$
- }
- });
-
- TableColumn typeColumn = typeViewerColumn.getColumn();
- typeColumn.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_TYPE_COLUMN_NAME);
- typeColumn.pack();
-
- columnWeightData = new ColumnWeightData(50, 100, true);
- tableLayout.addColumnData(columnWeightData);
-
- gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 2;
- gridData.verticalSpan = 5;
- cxfInstallations.getTable().setLayoutData(gridData);
-
- cxfInstallations.setContentProvider(new IStructuredContentProvider() {
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof Collection<?>) {
- return ((Collection<?>) inputElement).toArray();
- }
- return new Object[] {};
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
-
- cxfInstallations.setComparator(new ViewerComparator() {
- @Override
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- if (obj1 instanceof CXFInstall && obj2 instanceof CXFInstall) {
- return ((CXFInstall) obj1).getVersion().toString().trim().compareTo(
- ((CXFInstall) obj2).getVersion().toString().trim());
- }
- return super.compare(viewer, obj1, obj2);
- }
- });
-
- cxfInstallations.setInput(context.getInstallations().values());
-
- addButton = new Button(runtimeGroup, SWT.NONE);
- addButton.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_ADD_BUTTON_LABEL);
- gridData = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
- addButton.setLayoutData(gridData);
- addButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- CXFInstallWizard installWizard = new CXFInstallWizard();
- WizardDialog dialog = new WizardDialog(getShell(), installWizard);
- if (dialog.open() == Window.OK) {
- cxfInstallations.refresh();
- }
- }
- });
-
- editButton = new Button(runtimeGroup, SWT.NONE);
- editButton.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_EDIT_BUTTON_LABEL);
- gridData = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
- editButton.setLayoutData(gridData);
- editButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- IStructuredSelection selection = (IStructuredSelection) cxfInstallations.getSelection();
- if (selection != null && selection.getFirstElement() instanceof CXFInstall) {
- cxfInstallations.getCheckedElements();
- //int selectedInstall = cxfInstallations.getTable().getSelectionIndex();
- String checkedVersion = getCheckedVersion();
- CXFInstallWizard installWizard = new CXFInstallWizard((CXFInstall) selection.getFirstElement());
- WizardDialog dialog = new WizardDialog(getShell(), installWizard);
- if (dialog.open() == Window.OK) {
- cxfInstallations.refresh();
- if (checkedVersion != null) {
- setCheckedVersion(checkedVersion);
- }
- }
- }
- }
- });
- editButton.setEnabled(false);
-
- removeButton = new Button(runtimeGroup, SWT.NONE);
- removeButton.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_REMOVE_BUTTON_LABEL);
- gridData = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
- removeButton.setLayoutData(gridData);
- removeButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- IStructuredSelection selection = (IStructuredSelection) cxfInstallations.getSelection();
- @SuppressWarnings("unchecked")
- Iterator<CXFInstall> iter = selection.iterator();
- Map<String, CXFInstall> installations = context.getInstallations();
- while (iter.hasNext()) {
- CXFInstall install = iter.next();
- installations.remove(install.getVersion());
- }
- context.setInstallations(installations);
- cxfInstallations.refresh();
- if (cxfInstallations.getCheckedElements().length == 0) {
- setCheckedInstall(null);
- }
- }
- });
- removeButton.setEnabled(false);
-
- Label paddingLabel = new Label(runtimeGroup, SWT.NONE);
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false);
- gridData.horizontalSpan = 3;
- paddingLabel.setLayoutData(gridData);
-
- exportCXFClasspathContainerButton = new Button(runtimeGroup, SWT.CHECK);
- exportCXFClasspathContainerButton.setText(
- CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_EXPORT_CXF_CLASSPATH_CONTAINER);
- exportCXFClasspathContainerButton.setSelection(context.isExportCXFClasspathContainer());
- exportCXFClasspathContainerButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setExportCXFClasspathContainer(((Button) e.widget).getSelection());
- }
- });
- gridData = new GridData(SWT.FILL, SWT.FILL, false, false);
- gridData.horizontalSpan = 3;
- exportCXFClasspathContainerButton.setLayoutData(gridData);
-
- if (context.getDefaultRuntimeVersion().length() > 0) {
- exportCXFClasspathContainerButton.setEnabled(true);
- } else {
- exportCXFClasspathContainerButton.setEnabled(false);
- }
-
- //Java2WS
- TabItem java2WSTabItem = new TabItem(cxfPreferenceTab, SWT.NONE);
- java2WSTabItem.setText(CXFUIMessages.JAVA2WS_PREFERENCES_TAB_NAME);
- java2WSTabItem.setToolTipText(CXFUIMessages.JAVA2WS_PREFERENCES_TAB_TOOLTIP);
-
- java2WSPreferncesGroup = new Composite(cxfPreferenceTab, SWT.NONE);
-
- java2WSStackLayout = new StackLayout();
- java2WSPreferncesGroup.setLayout(java2WSStackLayout);
-
- java2WSDLPreferencesComposite = new Composite(java2WSPreferncesGroup, SWT.NONE);
- GridLayout java2WSGridLayout = new GridLayout(1, true);
- java2WSDLPreferencesComposite.setLayout(java2WSGridLayout);
-
- java2WSDLRuntimePreferencesComposite = new Java2WSDLRuntimePreferencesComposite(
- java2WSDLPreferencesComposite, SWT.NONE, cxfPreferenceTab);
- java2WSDLRuntimePreferencesComposite.addControls();
-
- java2WSPreferencesComposite = new Composite(java2WSPreferncesGroup, SWT.NONE);
- GridLayout java2WSDLGridLayout = new GridLayout(1, true);
- java2WSPreferencesComposite.setLayout(java2WSDLGridLayout);
-
- java2WSRuntimePreferencesComposite = new Java2WSRuntimePreferencesComposite(
- java2WSPreferencesComposite, SWT.NONE, cxfPreferenceTab);
- java2WSRuntimePreferencesComposite.addControls();
-
- java2WSBlankPreferencesComposite = new BlankRuntimePreferencesComposite(java2WSPreferncesGroup,
- SWT.NONE);
-
- java2WSTabItem.setControl(java2WSPreferncesGroup);
-
- //WSDL2Java
- TabItem wsdl2JavaTabItem = new TabItem(cxfPreferenceTab, SWT.NONE);
- wsdl2JavaTabItem.setText(CXFUIMessages.WSDL2JAVA_PREFERENCES_TAB_NAME);
- wsdl2JavaTabItem.setToolTipText(CXFUIMessages.WSDL2JAVA_PREFERENCES_TAB_TOOLTIP);
-
- wsdl2JavaPreferencesGroup = new Composite(cxfPreferenceTab, SWT.NONE);
-
- wsdl2javaStackLayout = new StackLayout();
- wsdl2JavaPreferencesGroup.setLayout(wsdl2javaStackLayout);
-
- wsdl2Java20PreferencesComposite = new Composite(wsdl2JavaPreferencesGroup, SWT.NONE);
- GridLayout wsdl2Java20GridLayout = new GridLayout(1, true);
- wsdl2Java20PreferencesComposite.setLayout(wsdl2Java20GridLayout);
-
- cxf20WSDL2JavaPreferencesComposite = new CXF20WSDL2JavaPreferencesComposite(
- wsdl2Java20PreferencesComposite, SWT.NONE);
- cxf20WSDL2JavaPreferencesComposite.addControls();
-
- wsdl2Java21PreferencesComposite = new Composite(wsdl2JavaPreferencesGroup, SWT.NONE);
- GridLayout wsdl2Java21GridLayout = new GridLayout(1, true);
- wsdl2Java21PreferencesComposite.setLayout(wsdl2Java21GridLayout);
-
- cxf21WSDL2JavaPreferencesComposite = new CXF21WSDL2JavaPreferencesComposite(
- wsdl2Java21PreferencesComposite, SWT.NONE);
- cxf21WSDL2JavaPreferencesComposite.addControls();
-
- wsdl2JavaBlankPreferencesComposite = new BlankRuntimePreferencesComposite(wsdl2JavaPreferencesGroup,
- SWT.NONE);
-
- wsdl2JavaTabItem.setControl(wsdl2JavaPreferencesGroup);
-
- //JAX-WS
- TabItem annotationsTabItem = new TabItem(cxfPreferenceTab, SWT.NONE);
- annotationsTabItem.setText(CXFUIMessages.ANNOTATIONS_PREFERENCES_TAB_NAME);
- annotationsTabItem.setToolTipText(CXFUIMessages.ANNOTATIONS_PREFERENCES_TAB_TOOLTIP);
-
- jaxwsPreferencesGroup = new Composite(cxfPreferenceTab, SWT.NONE);
-
- jaxwsStackLayout = new StackLayout();
- jaxwsPreferencesGroup.setLayout(jaxwsStackLayout);
-
- jaxwsPreferencesComposite = new Composite(jaxwsPreferencesGroup, SWT.NONE);
- GridLayout jaxwsGridLayout = new GridLayout(1, true);
- jaxwsPreferencesComposite.setLayout(jaxwsGridLayout);
- annotationsComposite = new AnnotationsComposite(jaxwsPreferencesComposite, SWT.SHADOW_IN);
-
- jaxwsBlankPreferencesComposite = new BlankRuntimePreferencesComposite(jaxwsPreferencesGroup,
- SWT.NONE);
-
- annotationsTabItem.setControl(jaxwsPreferencesGroup);
-
- //Spring Config
- TabItem springConfigTabItem = new TabItem(cxfPreferenceTab, SWT.NONE);
- springConfigTabItem.setText(CXFUIMessages.SPRING_CONFIG_PREFERENCES_TAB_NAME);
- springConfigTabItem.setToolTipText(CXFUIMessages.SPRING_CONFIG_PREFERENCES_TAB_TOOLTIP);
-
- springConfigPreferncesGroup = new Composite(cxfPreferenceTab, SWT.NONE);
-
- springConfigStackLayout = new StackLayout();
- springConfigPreferncesGroup.setLayout(springConfigStackLayout);
-
- springPreferencesComposite = new Composite(springConfigPreferncesGroup, SWT.NONE);
- GridLayout springGridLayout = new GridLayout(1, true);
- springPreferencesComposite.setLayout(springGridLayout);
- springConfigComposite = new SpringConfigComposite(springPreferencesComposite, SWT.SHADOW_IN);
-
- springConfigBlankPreferencesComposite = new BlankRuntimePreferencesComposite(springConfigPreferncesGroup,
- SWT.NONE);
-
- springConfigTabItem.setControl(springConfigPreferncesGroup);
-
- CXFInstall defaultInstall = getDefaultInstall();
- if (defaultInstall != null) {
- setSelection(new StructuredSelection(defaultInstall));
- }
-
- handlePreferenceControls();
-
- composite.pack();
- return composite;
- }
-
- private CXFInstall getDefaultInstall() {
- Collection<CXFInstall> set = context.getInstallations().values();
- Iterator<CXFInstall> setIterator = set.iterator();
- while (setIterator.hasNext()) {
- CXFInstall entry = setIterator.next();
- if (entry.getVersion().toString().trim().equals(context.getDefaultRuntimeVersion())) {
- return entry;
- }
- }
- return null;
- }
-
- private String getCheckedVersion() {
- Object[] checkedElements = cxfInstallations.getCheckedElements();
- if (checkedElements.length > 0) {
- return ((CXFInstall) checkedElements[0]).getVersion();
- }
- return null;
- }
-
- private void setCheckedVersion(String version) {
- TableItem[] tableItems = cxfInstallations.getTable().getItems();
- for (TableItem install : tableItems) {
- if (install.getText(0).equals(version)) {
- install.setChecked(true);
- }
- }
- }
-
- private void setCheckedInstall(Object element) {
- if (element == null) {
- setSelection(new StructuredSelection());
- } else {
- setSelection(new StructuredSelection(element));
- }
- }
-
- public void setSelection(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- if (!selection.equals(previousInstall)) {
- previousInstall = selection;
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- CXFInstall install = (CXFInstall) structuredSelection.getFirstElement();
- if (install != null) {
- cxfInstallations.setCheckedElements(new Object[]{ install });
- cxfInstallations.reveal(install);
- context.setDefaultRuntimeVersion(install.getVersion());
- context.setDefaultRuntimeLocation(install.getLocation());
- context.setDefaultRuntimeType(install.getType());
- exportCXFClasspathContainerButton.setEnabled(true);
- } else {
- context.setDefaultRuntimeVersion(""); //$NON-NLS-1$
- context.setDefaultRuntimeLocation(""); //$NON-NLS-1$
- context.setDefaultRuntimeType(""); //$NON-NLS-1$
- exportCXFClasspathContainerButton.setEnabled(false);
- }
- handlePreferenceControls();
- }
- }
- }
-
- private void handlePreferenceControls() {
- if (context.getDefaultRuntimeLocation().equals("") || context.getDefaultRuntimeVersion().equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- java2WSStackLayout.topControl = java2WSBlankPreferencesComposite;
- wsdl2javaStackLayout.topControl = wsdl2JavaBlankPreferencesComposite;
- jaxwsStackLayout.topControl = jaxwsBlankPreferencesComposite;
- springConfigStackLayout.topControl = springConfigBlankPreferencesComposite;
- } else if (context.getDefaultRuntimeVersion().compareTo(CXFCorePlugin.CXF_VERSION_2_1) >= 0) {
- java2WSStackLayout.topControl = java2WSPreferencesComposite;
- wsdl2javaStackLayout.topControl = wsdl2Java21PreferencesComposite;
- jaxwsStackLayout.topControl = jaxwsPreferencesComposite;
- springConfigStackLayout.topControl = springPreferencesComposite;
- } else {
- java2WSStackLayout.topControl = java2WSDLPreferencesComposite;
- wsdl2javaStackLayout.topControl = wsdl2Java20PreferencesComposite;
- jaxwsStackLayout.topControl = jaxwsPreferencesComposite;
- springConfigStackLayout.topControl = springPreferencesComposite;
- }
- java2WSPreferncesGroup.layout();
- wsdl2JavaPreferencesGroup.layout();
- jaxwsPreferencesGroup.layout();
- springConfigPreferncesGroup.layout();
- refresh();
- }
-
- // private void updateStatus() {
- // // CXF_LOCATION_STATUS = checkRuntimeExist(cxfHomeDirText.getText());
- // applyStatusToPage(findMostSevere());
- // }
-
- // private void applyStatusToPage(IStatus status) {
- // String message = status.getMessage();
- // if (status.getSeverity() > IStatus.OK) {
- // setErrorMessage(message);
- // } else {
- // setMessage(getTitle());
- // setErrorMessage(null);
- // }
- //
- // }
- //
- // private IStatus findMostSevere() {
- // return CXF_LOCATION_STATUS;
- // }
-
- private void setDefaults() {
- exportCXFClasspathContainerButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.CXF_CONTEXT, CXFPackage.CXF_CONTEXT__EXPORT_CXF_CLASSPATH_CONTAINER));
-
- java2WSDLRuntimePreferencesComposite.setDefaults();
- java2WSRuntimePreferencesComposite.setDefaults();
- cxf20WSDL2JavaPreferencesComposite.setDefaults();
- cxf21WSDL2JavaPreferencesComposite.setDefaults();
- annotationsComposite.setDefaults();
- springConfigComposite.setDefaults();
- }
-
- private void refresh() {
- if (context.getDefaultRuntimeVersion().compareTo(CXFCorePlugin.CXF_VERSION_2_1) >= 0) {
- java2WSRuntimePreferencesComposite.refresh();
- cxf21WSDL2JavaPreferencesComposite.refresh();
- } else {
- java2WSDLRuntimePreferencesComposite.refresh();
- cxf20WSDL2JavaPreferencesComposite.refresh();
- }
- }
-
- private void storeValues() {
- context.setExportCXFClasspathContainer(exportCXFClasspathContainerButton.getSelection());
-
- if (context.getDefaultRuntimeVersion().compareTo(CXFCorePlugin.CXF_VERSION_2_1) >= 0) {
- java2WSRuntimePreferencesComposite.storeValues();
- cxf21WSDL2JavaPreferencesComposite.storeValues();
- } else {
- java2WSDLRuntimePreferencesComposite.storeValues();
- cxf20WSDL2JavaPreferencesComposite.storeValues();
- }
- annotationsComposite.storeValues();
- springConfigComposite.storeValues();
- }
-
- @Override
- protected void performApply() {
- super.performApply();
- }
-
- @Override
- public boolean performCancel() {
- return super.performCancel();
- }
-
- @Override
- protected void performDefaults() {
- super.performDefaults();
- setDefaults();
- }
-
- @Override
- public boolean performOk() {
- storeValues();
- return true;
- }
-
- @Override
- public void dispose() {
- super.dispose();
- if (libraryImage != null) {
- libraryImage.dispose();
- libraryImage = null;
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/properties/CXFPropertyPage.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/properties/CXFPropertyPage.java
deleted file mode 100644
index f049dad..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/properties/CXFPropertyPage.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Shane Clarke.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Shane Clarke - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.properties;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.ClasspathContainerInitializer;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.ws.internal.cxf.core.CXFClasspathContainer;
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFInstall;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class CXFPropertyPage extends PropertyPage {
-
- private IJavaProject javaProject;
- private IProject project;
- private ComboViewer installationsComboViewer;
- private Link link;
- private CXFInstall defaultInstall;
- private CXFContext context;
-
- public CXFPropertyPage() {
- context = CXFCorePlugin.getDefault().getJava2WSContext();
- }
-
- @Override
- protected Control createContents(Composite parent) {
- IAdaptable element = getElement();
-
- if (!(element instanceof IJavaProject)) {
- return null;
- }
-
- javaProject = (IJavaProject) element;
- this.project = javaProject.getProject();
-
- Composite composite = new Composite(parent, SWT.NONE);
-
- GridLayout gridLayout = new GridLayout(2, false);
- composite.setLayout(gridLayout);
-
- link = new Link(composite, SWT.NONE);
- link.setText(CXFUIMessages.CXF_CONFIGURE_INSTALLED_RUNTIMES_LABEL);
- link.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- int selectedIndex = installationsComboViewer.getCombo().getSelectionIndex();
- int result = PreferencesUtil.createPreferenceDialogOn(getShell(),
- "org.eclipse.jst.ws.cxf.ui.CXFRuntimePreferencesPage", //$NON-NLS-1$
- new String[] {"org.eclipse.jst.ws.cxf.ui.CXFRuntimePreferencesPage"}, null).open(); //$NON-NLS-1$
- if (result == Window.OK) {
- installationsComboViewer.refresh();
- installationsComboViewer.getCombo().select(selectedIndex);
- }
- }
- });
-
- GridData gridData = new GridData(SWT.END, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- link.setLayoutData(gridData);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(CXFUIMessages.CXF_PROPERTY_PAGE_RUNTIME_LABEL);
-
- installationsComboViewer = new ComboViewer(composite, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- installationsComboViewer.getCombo().setLayoutData(gridData);
-
- installationsComboViewer.setContentProvider(new IStructuredContentProvider() {
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof Collection<?>) {
- return ((Collection<?>) inputElement).toArray();
- }
- return new Object[] {};
- }
- });
-
- installationsComboViewer.setLabelProvider(new LabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof CXFInstall) {
- CXFInstall cxfInstall = (CXFInstall) element;
- return cxfInstall.getType() + " " + cxfInstall.getVersion();
- }
- return ""; //$NON-NLS-1$
- }
-
- });
-
- Collection<CXFInstall> installations = context.getInstallations().values();
-
- installationsComboViewer.setInput(installations);
-
- String intalledVersion = CXFCorePlugin.getDefault().getCXFRuntimeVersion(project);
- defaultInstall = context.getInstallations().get(intalledVersion);
- if (defaultInstall != null) {
- installationsComboViewer.setSelection(new StructuredSelection(defaultInstall), true);
- }
- return composite;
- }
-
- @Override
- public boolean performOk() {
- CXFInstall selectedInstall = getSelectedInstall();
- //if (isUpdateRequired(project, selectedInstall)) {
- //if (!defaultInstall.getVersion().equals(selectedInstall.getVersion())) {
- if (selectedInstall != null) {
- CXFCorePlugin.getDefault().setCXFRuntimeVersion(project, selectedInstall.getVersion());
-
- ClasspathContainerInitializer classpathContainerInitializer = JavaCore.getClasspathContainerInitializer(
- CXFCorePlugin.CXF_CLASSPATH_CONTAINER_ID);
- if (classpathContainerInitializer != null) {
- IPath containerPath = new Path(CXFCorePlugin.CXF_CLASSPATH_CONTAINER_ID);
- CXFClasspathContainer cxfClasspathContainer = new CXFClasspathContainer(containerPath, javaProject);
- try {
- classpathContainerInitializer.requestClasspathContainerUpdate(containerPath, javaProject,
- cxfClasspathContainer);
- } catch (CoreException ce) {
- CXFCorePlugin.log(ce.getStatus());
- }
- }
- }
- return true;
- }
-
- private CXFInstall getSelectedInstall() {
- StructuredSelection structuredSelection = (StructuredSelection) installationsComboViewer.getSelection();
- if (!structuredSelection.isEmpty()) {
- CXFInstall selectedInstall = (CXFInstall) structuredSelection.getFirstElement();
- return selectedInstall;
- }
- return null;
- }
-
- @Override
- protected void performDefaults() {
- CXFInstall defaultInstall = context.getInstallations().get(context.getDefaultRuntimeVersion());
- if (defaultInstall != null) {
- installationsComboViewer.setSelection(new StructuredSelection(defaultInstall), true);
- }
- super.performDefaults();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/JavaViewerFilter.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/JavaViewerFilter.java
deleted file mode 100644
index 8440008..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/JavaViewerFilter.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Shane Clarke.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Shane Clarke - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.viewers;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-
-/**
- * <code>ViewerFilter</code> that filters on classes or interfaces within a <code>IJavaProject</code>
- *
- */
-public class JavaViewerFilter extends ViewerFilter {
-
- private IJavaProject javaProject;
- private int elementKinds;
-
- /**
- * Constructs an instance of <code>JavaViewerFilter</code> given a <code>IJavaProject</code> and an
- * <code>IJavaSearchConstants</code> element kind to search for. All other elements are filtered.
- *
- * @param javaProject the java project to filter
- * @param elementKinds a flag defining nature of searched elements; the only valid values are:
- * <code>IJavaSearchConstants.CLASS</code>
- * <code>IJavaSearchConstants.INTERFACE</code>
- * <code>IJavaSearchConstants.CLASS_AND_INTERFACE</code>
- */
- public JavaViewerFilter(IJavaProject javaProject, int elementKinds) {
- this.javaProject = javaProject;
- this.elementKinds = elementKinds;
-
- }
-
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- try {
- if (element instanceof IJavaProject) {
- return javaProject.equals((IJavaProject) element);
- }
- if (element instanceof IPackageFragmentRoot) {
- IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) element;
- return packageFragmentRoot.getKind() == IPackageFragmentRoot.K_SOURCE;
- }
- if (element instanceof IPackageFragment) {
- IPackageFragment packageFragment = (IPackageFragment) element;
- return packageFragment.hasChildren();
- }
- if (element instanceof ICompilationUnit) {
- ICompilationUnit compilationUnit = (ICompilationUnit) element;
- IType type = compilationUnit.findPrimaryType();
- switch (elementKinds) {
- case IJavaSearchConstants.CLASS:
- return type.isClass();
- case IJavaSearchConstants.INTERFACE:
- return type.isInterface() && !type.isAnnotation();
- case IJavaSearchConstants.CLASS_AND_INTERFACE:
- return type.isClass() || (type.isInterface() && !type.isAnnotation());
- }
-
- }
- } catch (JavaModelException jme) {
- CXFUIPlugin.log(jme.getStatus());
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameColumnLabelProvider.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameColumnLabelProvider.java
deleted file mode 100644
index 2606742..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameColumnLabelProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.viewers;
-
-import java.util.Map;
-
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jst.ws.internal.cxf.core.model.WSDL2JavaDataModel;
-import org.eclipse.jst.ws.jaxws.core.utils.WSDLUtils;
-
-public class PackageNameColumnLabelProvider extends ColumnLabelProvider {
- private Map<String, String> includedNamespaces;
-
- public PackageNameColumnLabelProvider(WSDL2JavaDataModel model) {
- includedNamespaces = model.getIncludedNamespaces();
- }
-
- @Override
- public String getText(Object element) {
- if (includedNamespaces.containsKey(element.toString())) {
- return includedNamespaces.get(element.toString());
- }
- return WSDLUtils.getPackageNameFromNamespace(element.toString());
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameEditingSupport.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameEditingSupport.java
deleted file mode 100644
index b4657fb..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameEditingSupport.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.viewers;
-
-import java.util.Map;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jst.ws.internal.cxf.core.model.WSDL2JavaDataModel;
-import org.eclipse.jst.ws.jaxws.core.utils.WSDLUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-public class PackageNameEditingSupport extends EditingSupport implements SelectionListener {
- private CellEditor packageNameCellEditor;
- private Table table;
- private Map<String, String> includedNamespaces;
-
- public PackageNameEditingSupport(TableViewer tableViewer, CellEditor packageNameCellEditor,
- WSDL2JavaDataModel model) {
- super(tableViewer);
- this.table = tableViewer.getTable();
- this.packageNameCellEditor = packageNameCellEditor;
- includedNamespaces = model.getIncludedNamespaces();
- table.addSelectionListener(this);
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return table.getSelection()[0].getChecked();
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return packageNameCellEditor;
- }
-
- @Override
- protected Object getValue(Object element) {
- if (includedNamespaces.containsKey(element.toString())) {
- return includedNamespaces.get(element.toString());
- }
- return WSDLUtils.getPackageNameFromNamespace(element.toString());
- }
-
- @Override
- protected void setValue(Object namespace, Object packageName) {
- if (namespace != null && packageName != null) {
- includedNamespaces.put(namespace.toString(), packageName.toString());
- getViewer().update(namespace, null);
- }
- }
-
- public void widgetSelected(SelectionEvent event) {
- if (event.detail == SWT.CHECK) {
- TableItem item = (TableItem) event.item;
- String namespaceKey = item.getText(0);
- String packageName = item.getText(1);
- if (item.getChecked()) {
- if (!includedNamespaces.containsKey(namespaceKey)) {
- includedNamespaces.put(namespaceKey, packageName);
- }
- } else {
- if (includedNamespaces.containsKey(namespaceKey)) {
- includedNamespaces.remove(namespaceKey);
- }
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent event) {
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameTableContentProvider.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameTableContentProvider.java
deleted file mode 100644
index f9cb6e4..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/viewers/PackageNameTableContentProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.viewers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.Definition;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class PackageNameTableContentProvider implements IStructuredContentProvider {
-
- @SuppressWarnings("unchecked")
- public Object[] getElements(Object inputElement) {
- List<Object> elements = new ArrayList<Object>();
- if (inputElement instanceof Definition) {
- Definition definition = (Definition) inputElement;
- Map namespaces = definition.getNamespaces();
- Collection values = namespaces.values();
- for (Object namespaceValue : values) {
- String namespace = namespaceValue.toString();
- if (!namespace.equals(definition.getTargetNamespace()) && !elements.contains(namespace)) {
- elements.add(namespace);
- }
- }
- }
- return elements.toArray(new Object[elements.size()]);
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/AnnotationsComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/AnnotationsComposite.java
deleted file mode 100644
index 73b094f..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/AnnotationsComposite.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.context.Java2WSPersistentContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-public class AnnotationsComposite extends Composite {
- private Java2WSPersistentContext context = CXFCorePlugin.getDefault().getJava2WSContext();
-
- private Button generateWebMethodButton;
- private Button generateWebParamButton;
- private Button generateRequestWrapperButton;
- private Button generateResponseWrapperButton;
-
- private Button enableAPTButton;
-
- public AnnotationsComposite(Composite parent, int style) {
- super(parent, style);
- addControls();
- }
-
- private void addControls() {
- GridLayout preflayout = new GridLayout(1, true);
- this.setLayout(preflayout);
-
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- this.setLayoutData(gridData);
-
- Group jaxwsAnnotationsGroup = new Group(this, SWT.SHADOW_IN);
- jaxwsAnnotationsGroup.setText(CXFUIMessages.JAXWS_ANNOTATIONS_GROUP_LABEL);
- jaxwsAnnotationsGroup.setToolTipText(CXFUIMessages.JAXWS_ANNOTATIONS_GROUP_TOOLTIP);
- GridLayout gridLayout = new GridLayout(1, true);
- jaxwsAnnotationsGroup.setLayout(gridLayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- jaxwsAnnotationsGroup.setLayoutData(gridData);
-
- generateWebMethodButton = new Button(jaxwsAnnotationsGroup, SWT.CHECK);
- generateWebMethodButton.setText(CXFUIMessages.JAXWS_GENERATE_WEB_METHOD);
- generateWebMethodButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setGenerateWebMethodAnnotation(selected);
- }
- });
- generateWebMethodButton.setSelection(context.isGenerateWebMethodAnnotation());
-
- generateWebParamButton = new Button(jaxwsAnnotationsGroup, SWT.CHECK);
- generateWebParamButton.setText(CXFUIMessages.JAXWS_GENERATE_WEB_PARAM);
- generateWebParamButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setGenerateWebParamAnnotation(selected);
- }
- });
- generateWebParamButton.setSelection(context.isGenerateWebParamAnnotation());
-
- generateRequestWrapperButton = new Button(jaxwsAnnotationsGroup, SWT.CHECK);
- generateRequestWrapperButton.setText(CXFUIMessages.JAXWS_GENERATE_REQUEST_WRAPPER);
- generateRequestWrapperButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setGenerateRequestWrapperAnnotation(selected);
- }
- });
- generateRequestWrapperButton.setSelection(context.isGenerateRequestWrapperAnnotation());
-
- generateResponseWrapperButton = new Button(jaxwsAnnotationsGroup, SWT.CHECK);
- generateResponseWrapperButton.setText(CXFUIMessages.JAXWS_GENERATE_RESPONSE_WRAPPER);
- generateResponseWrapperButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setGenerateResponseWrapperAnnotation(selected);
- }
- });
- generateResponseWrapperButton.setSelection(context.isGenerateResponseWrapperAnnotation());
-
- Group annotationProcessingGroup = new Group(this, SWT.SHADOW_IN);
- annotationProcessingGroup.setText(CXFUIMessages.JAXWS_ANNOTATIONS_PROCESSING_GROUP_LABEL);
- annotationProcessingGroup.setToolTipText(CXFUIMessages.bind(
- CXFUIMessages.JAXWS_ENABLE_ANNOTATION_PROCESSING_TOOLTIP,
- context.getDefaultRuntimeType()));
- gridLayout = new GridLayout(1, true);
- annotationProcessingGroup.setLayout(gridLayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- annotationProcessingGroup.setLayoutData(gridData);
-
- enableAPTButton = new Button(annotationProcessingGroup, SWT.CHECK);
- enableAPTButton.setText(CXFUIMessages.JAXWS_ENABLE_ANNOTATION_PROCESSING);
- enableAPTButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setAnnotationProcessingEnabled(selected);
- }
- });
- enableAPTButton.setSelection(context.isAnnotationProcessingEnabled());
- }
-
- public void setDefaults() {
- generateWebMethodButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_WEB_METHOD_ANNOTATION));
-
- generateWebParamButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_WEB_PARAM_ANNOTATION));
-
- generateRequestWrapperButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_REQUEST_WRAPPER_ANNOTATION));
-
- generateResponseWrapperButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_RESPONSE_WRAPPER_ANNOTATION));
-
- enableAPTButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__ANNOTATION_PROCESSING_ENABLED));
- }
-
- public void storeValues() {
- context.setGenerateWebMethodAnnotation(generateWebMethodButton.getSelection());
- context.setGenerateWebParamAnnotation(generateWebParamButton.getSelection());
- context.setGenerateRequestWrapperAnnotation(generateRequestWrapperButton.getSelection());
- context.setGenerateResponseWrapperAnnotation(generateResponseWrapperButton.getSelection());
- context.setAnnotationProcessingEnabled(enableAPTButton.getSelection());
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/BlankRuntimePreferencesComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/BlankRuntimePreferencesComposite.java
deleted file mode 100644
index d4e41f1..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/BlankRuntimePreferencesComposite.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class BlankRuntimePreferencesComposite extends Composite {
-
- public BlankRuntimePreferencesComposite(Composite parent, int style) {
- super(parent, style);
-
- addControls();
- }
-
- private void addControls() {
- this.setLayout(new GridLayout());
- CLabel setIntallDirLabel = new CLabel(this, SWT.NONE);
- GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
- setIntallDirLabel.setLayoutData(gridData);
- setIntallDirLabel.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(
- ISharedImages.IMG_OBJS_ERROR_TSK));
- setIntallDirLabel.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_NOT_SET);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF20WSDL2JavaPreferencesComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF20WSDL2JavaPreferencesComposite.java
deleted file mode 100644
index 5d1d9c9..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF20WSDL2JavaPreferencesComposite.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.model.WSDL2JavaContext;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-public class CXF20WSDL2JavaPreferencesComposite extends Composite {
- WSDL2JavaContext context = CXFCorePlugin.getDefault().getWSDL2JavaContext();
-
- private Button generateServerButton;
- private Button generateImplementationButton;
- private Button processSOAPHeadersButton;
- private Button namespacePackageMappingButton;
- private Button excludesNamespaceMappingButton;
-
- private Button useDefaultValuesButton;
- private Button autoNameResolutionButton;
-
- private Table xjcArgsTable;
-
- private TableItem xjcDefaultValuesTableItem;
- private TableItem xjcToStringTableItem;
- private TableItem xjcToStringMultiLineTableItem;
- private TableItem xjcToStringSimpleTableItem;
- private TableItem xjcLocatorTableItem;
- private TableItem xjcSyncMethodsTableItem;
- private TableItem xjcMarkGeneratedTableItem;
-
- public CXF20WSDL2JavaPreferencesComposite(Composite parent, int style) {
- super(parent, style);
- }
-
- public void addControls() {
- GridLayout preflayout = new GridLayout(1, true);
- this.setLayout(preflayout);
-
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- this.setLayoutData(gridData);
-
- Group wsdl2javaGroup = new Group(this, SWT.SHADOW_IN);
- wsdl2javaGroup.setText(CXFUIMessages.WSDL2JAVA_GROUP_LABEL);
- GridLayout wsdl2javalayout = new GridLayout(1, true);
- wsdl2javaGroup.setLayout(wsdl2javalayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- wsdl2javaGroup.setLayoutData(gridData);
-
- generateServerButton = WSDL2JavaWidgetFactory.createGenerateServerButton(wsdl2javaGroup, context);
- generateImplementationButton = WSDL2JavaWidgetFactory.createGenerateImplementationButton(
- wsdl2javaGroup, context);
-
- useDefaultValuesButton = WSDL2JavaWidgetFactory.createDefaultValuesButton(wsdl2javaGroup, context);
-
- processSOAPHeadersButton = WSDL2JavaWidgetFactory.createProcessSOAPHeadersButton(wsdl2javaGroup,
- context);
-
- namespacePackageMappingButton = WSDL2JavaWidgetFactory.createNamespacePackageMappingButton(
- wsdl2javaGroup, context);
-
- excludesNamespaceMappingButton = WSDL2JavaWidgetFactory.createExcludesNamespaceMappingButton(
- wsdl2javaGroup, context);
-
- if (CXFModelUtils.isAutoNameResolutionPermitted()) {
- autoNameResolutionButton = WSDL2JavaWidgetFactory.createAutoNameResolutionButton(wsdl2javaGroup,
- context);
- }
-
- Group xjcArgGroup = new Group(this, SWT.SHADOW_IN);
- xjcArgGroup.setText(CXFUIMessages.WSDL2JAVA_XJC_ARG_GROUP_TITLE);
- GridLayout xjcArgLayout = new GridLayout(1, true);
- xjcArgGroup.setLayout(xjcArgLayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- xjcArgGroup.setLayoutData(gridData);
-
- xjcArgsTable = WSDL2JavaWidgetFactory.createXJCArgTable(xjcArgGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 3;
- gridData.verticalSpan = 6;
- xjcArgsTable.setLayoutData(gridData);
-
- xjcDefaultValuesTableItem = WSDL2JavaWidgetFactory.createXJCDefaultValuesTableItem(xjcArgsTable,
- context);
- xjcToStringTableItem = WSDL2JavaWidgetFactory.createXJCToStringTableItem(xjcArgsTable, context);
- xjcToStringMultiLineTableItem = WSDL2JavaWidgetFactory.createXJCToStringMultiLineTableItem(
- xjcArgsTable, context);
- xjcToStringSimpleTableItem = WSDL2JavaWidgetFactory.createXJCToStringSimpleTableItem(xjcArgsTable,
- context);
- xjcLocatorTableItem = WSDL2JavaWidgetFactory.createXJCLocatorTableItem(xjcArgsTable, context);
- xjcSyncMethodsTableItem = WSDL2JavaWidgetFactory.createXJCSyncMethodsTableItem(xjcArgsTable, context);
- xjcMarkGeneratedTableItem = WSDL2JavaWidgetFactory.createXJCMarkGeneratedTableItem(xjcArgsTable,
- context);
- }
-
- public void setDefaults() {
- useDefaultValuesButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__USE_DEFAULT_VALUES));
-
- generateServerButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.CXF_CONTEXT,
- CXFPackage.CXF_CONTEXT__GENERATE_SERVER));
- generateImplementationButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__GENERATE_IMPLEMENTATION));
- processSOAPHeadersButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__PROCESS_SOAP_HEADERS));
- namespacePackageMappingButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__LOAD_DEFAULT_NAMESPACE_PACKAGE_NAME_MAPPING));
- excludesNamespaceMappingButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__LOAD_DEFAULT_EXCLUDES_NAMEPSACE_MAPPING));
-
- if (canUpdateAutoNameResolution()) {
- autoNameResolutionButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__AUTO_NAME_RESOLUTION));
- }
-
- xjcDefaultValuesTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_USE_DEFAULT_VALUES));
- xjcToStringTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__XJC_TO_STRING));
- xjcToStringMultiLineTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_TO_STRING_MULTI_LINE));
- xjcToStringSimpleTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_TO_STRING_SIMPLE));
- xjcLocatorTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__XJC_LOCATOR));
- xjcSyncMethodsTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_SYNC_METHODS));
- xjcMarkGeneratedTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_MARK_GENERATED));
- }
-
- public void refresh() {
- useDefaultValuesButton.setSelection(context.isUseDefaultValues());
- generateServerButton.setSelection(context.isGenerateServer());
- generateImplementationButton.setSelection(context.isGenerateImplementation());
- processSOAPHeadersButton.setSelection(context.isProcessSOAPHeaders());
- namespacePackageMappingButton.setSelection(context.isLoadDefaultNamespacePackageNameMapping());
- excludesNamespaceMappingButton.setSelection(context.isLoadDefaultExcludesNamepsaceMapping());
-
- if (canUpdateAutoNameResolution()) {
- autoNameResolutionButton.setSelection(context.isAutoNameResolution());
- }
-
- xjcDefaultValuesTableItem.setChecked(context.isXjcUseDefaultValues());
- xjcToStringTableItem.setChecked(context.isXjcToString());
- xjcToStringMultiLineTableItem.setChecked(context.isXjcToStringMultiLine());
- xjcToStringSimpleTableItem.setChecked(context.isXjcToStringSimple());
- xjcLocatorTableItem.setChecked(context.isXjcLocator());
- xjcSyncMethodsTableItem.setChecked(context.isXjcSyncMethods());
- xjcMarkGeneratedTableItem.setChecked(context.isXjcMarkGenerated());
- }
-
- public void storeValues() {
- context.setUseDefaultValues(useDefaultValuesButton.getSelection());
- context.setGenerateServer(generateServerButton.getSelection());
- context.setGenerateImplementation(generateImplementationButton.getSelection());
- context.setProcessSOAPHeaders(processSOAPHeadersButton.getSelection());
- context.setLoadDefaultNamespacePackageNameMapping(namespacePackageMappingButton.getSelection());
- context.setLoadDefaultExcludesNamepsaceMapping(excludesNamespaceMappingButton.getSelection());
-
- if (canUpdateAutoNameResolution()) {
- context.setAutoNameResolution(autoNameResolutionButton.getSelection());
- }
-
- context.setXjcUseDefaultValues(xjcDefaultValuesTableItem.getChecked());
- context.setXjcToString(xjcToStringTableItem.getChecked());
- context.setXjcToStringMultiLine(xjcToStringMultiLineTableItem.getChecked());
- context.setXjcToStringSimple(xjcToStringSimpleTableItem.getChecked());
- context.setXjcLocator(xjcLocatorTableItem.getChecked());
- context.setXjcSyncMethods(xjcSyncMethodsTableItem.getChecked());
- context.setXjcMarkGenerated(xjcMarkGeneratedTableItem.getChecked());
- }
-
- private boolean canUpdateAutoNameResolution() {
- return autoNameResolutionButton != null && CXFModelUtils.isAutoNameResolutionPermitted();
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF21WSDL2JavaPreferencesComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF21WSDL2JavaPreferencesComposite.java
deleted file mode 100644
index 142cb30..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/CXF21WSDL2JavaPreferencesComposite.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.model.WSDL2JavaContext;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-public class CXF21WSDL2JavaPreferencesComposite extends Composite {
- WSDL2JavaContext context = CXFCorePlugin.getDefault().getWSDL2JavaContext();
-
- private Button generateServerButton;
- private Button generateImplementationButton;
- private Button processSOAPHeadersButton;
- private Button namespacePackageMappingButton;
- private Button excludesNamespaceMappingButton;
-
- private Table xjcArgsTable;
-
- private TableItem xjcDefaultValuesTableItem;
- private TableItem xjcToStringTableItem;
- private TableItem xjcToStringMultiLineTableItem;
- private TableItem xjcToStringSimpleTableItem;
- private TableItem xjcLocatorTableItem;
- private TableItem xjcSyncMethodsTableItem;
- private TableItem xjcMarkGeneratedTableItem;
-
- private Button useDefaultValuesButton;
- private Button noAddressBindingButton;
- private Button autoNameResolutionButton;
-
- public CXF21WSDL2JavaPreferencesComposite(Composite parent, int style) {
- super(parent, style);
- }
-
- public void addControls() {
- GridLayout preflayout = new GridLayout(1, true);
- this.setLayout(preflayout);
-
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- this.setLayoutData(gridData);
-
- Group wsdl2javaGroup = new Group(this, SWT.SHADOW_IN);
- wsdl2javaGroup.setText(CXFUIMessages.WSDL2JAVA_GROUP_LABEL);
- GridLayout wsdl2javalayout = new GridLayout(2, false);
- wsdl2javaGroup.setLayout(wsdl2javalayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- wsdl2javaGroup.setLayoutData(gridData);
-
- // Frontend
- // WSDL2JavaWidgetFactory.createFrontendLabel(wsdl2javaGroup);
- // Combo frontendCombo =
- // WSDL2JavaWidgetFactory.createFrontendCombo(wsdl2javaGroup, context);
- // gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- // frontendCombo.setLayoutData(gridData);
-
- // Databinding
- // WSDL2JavaWidgetFactory.createDatabindingLabel(wsdl2javaGroup);
- // Combo databindingCombo =
- // WSDL2JavaWidgetFactory.createDatabindingCombo(wsdl2javaGroup,
- // context);
- // gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- // databindingCombo.setLayoutData(gridData);
-
- // WSDL Version
- // WSDL2JavaWidgetFactory. createWSDLVersionLabel(wsdl2javaGroup);
- // Combo wsdlVersionCombo =
- // WSDL2JavaWidgetFactory.createWSDLVersionCombo(wsdl2javaGroup,
- // context);
- // gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- // wsdlVersionCombo.setLayoutData(gridData);
-
- generateServerButton = WSDL2JavaWidgetFactory.createGenerateServerButton(wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- generateServerButton.setLayoutData(gridData);
-
- generateImplementationButton = WSDL2JavaWidgetFactory.createGenerateImplementationButton(
- wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- generateImplementationButton.setLayoutData(gridData);
-
- useDefaultValuesButton = WSDL2JavaWidgetFactory.createDefaultValuesButton(wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- useDefaultValuesButton.setLayoutData(gridData);
-
- processSOAPHeadersButton = WSDL2JavaWidgetFactory.createProcessSOAPHeadersButton(wsdl2javaGroup,
- context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- processSOAPHeadersButton.setLayoutData(gridData);
-
- namespacePackageMappingButton = WSDL2JavaWidgetFactory.createNamespacePackageMappingButton(
- wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- namespacePackageMappingButton.setLayoutData(gridData);
-
- excludesNamespaceMappingButton = WSDL2JavaWidgetFactory.createExcludesNamespaceMappingButton(
- wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- excludesNamespaceMappingButton.setLayoutData(gridData);
-
- if (CXFModelUtils.isAutoNameResolutionPermitted()) {
- autoNameResolutionButton = WSDL2JavaWidgetFactory.createAutoNameResolutionButton(wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- autoNameResolutionButton.setLayoutData(gridData);
- }
-
- noAddressBindingButton = WSDL2JavaWidgetFactory.createNoAddressBindingButton(wsdl2javaGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- noAddressBindingButton.setLayoutData(gridData);
-
- Group xjcArgGroup = new Group(this, SWT.SHADOW_IN);
- xjcArgGroup.setText(CXFUIMessages.WSDL2JAVA_XJC_ARG_GROUP_TITLE);
- GridLayout xjcArgLayout = new GridLayout(1, true);
- xjcArgGroup.setLayout(xjcArgLayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- xjcArgGroup.setLayoutData(gridData);
-
- xjcArgsTable = WSDL2JavaWidgetFactory.createXJCArgTable(xjcArgGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 3;
- gridData.verticalSpan = 6;
- xjcArgsTable.setLayoutData(gridData);
-
- xjcDefaultValuesTableItem = WSDL2JavaWidgetFactory.createXJCDefaultValuesTableItem(xjcArgsTable,
- context);
- xjcToStringTableItem = WSDL2JavaWidgetFactory.createXJCToStringTableItem(xjcArgsTable, context);
- xjcToStringMultiLineTableItem = WSDL2JavaWidgetFactory.createXJCToStringMultiLineTableItem(
- xjcArgsTable, context);
- xjcToStringSimpleTableItem = WSDL2JavaWidgetFactory.createXJCToStringSimpleTableItem(xjcArgsTable,
- context);
- xjcLocatorTableItem = WSDL2JavaWidgetFactory.createXJCLocatorTableItem(xjcArgsTable, context);
- xjcSyncMethodsTableItem = WSDL2JavaWidgetFactory.createXJCSyncMethodsTableItem(xjcArgsTable, context);
- xjcMarkGeneratedTableItem = WSDL2JavaWidgetFactory.createXJCMarkGeneratedTableItem(xjcArgsTable,
- context);
- }
-
- public void setDefaults() {
- useDefaultValuesButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__USE_DEFAULT_VALUES));
-
- noAddressBindingButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__NO_ADDRESS_BINDING));
-
- generateServerButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.CXF_CONTEXT,
- CXFPackage.CXF_CONTEXT__GENERATE_SERVER));
-
- generateImplementationButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__GENERATE_IMPLEMENTATION));
-
- processSOAPHeadersButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__PROCESS_SOAP_HEADERS));
-
- namespacePackageMappingButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__LOAD_DEFAULT_NAMESPACE_PACKAGE_NAME_MAPPING));
-
- excludesNamespaceMappingButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__LOAD_DEFAULT_EXCLUDES_NAMEPSACE_MAPPING));
-
- if (canUpdateAutoNameResolution()) {
- autoNameResolutionButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__AUTO_NAME_RESOLUTION));
- }
-
- xjcDefaultValuesTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_USE_DEFAULT_VALUES));
-
- xjcToStringTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__XJC_TO_STRING));
-
- xjcToStringMultiLineTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_TO_STRING_MULTI_LINE));
-
- xjcToStringSimpleTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_TO_STRING_SIMPLE));
-
- xjcLocatorTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(CXFPackage.WSDL2_JAVA_CONTEXT,
- CXFPackage.WSDL2_JAVA_CONTEXT__XJC_LOCATOR));
-
- xjcSyncMethodsTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_SYNC_METHODS));
-
- xjcMarkGeneratedTableItem.setChecked(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.WSDL2_JAVA_CONTEXT, CXFPackage.WSDL2_JAVA_CONTEXT__XJC_MARK_GENERATED));
- }
-
- public void refresh() {
- useDefaultValuesButton.setSelection(context.isUseDefaultValues());
- noAddressBindingButton.setSelection(context.isNoAddressBinding());
-
- if (canUpdateAutoNameResolution()) {
- autoNameResolutionButton.setSelection(context.isAutoNameResolution());
- }
-
- generateServerButton.setSelection(context.isGenerateServer());
- generateImplementationButton.setSelection(context.isGenerateImplementation());
- processSOAPHeadersButton.setSelection(context.isProcessSOAPHeaders());
- namespacePackageMappingButton.setSelection(context.isLoadDefaultNamespacePackageNameMapping());
- excludesNamespaceMappingButton.setSelection(context.isLoadDefaultExcludesNamepsaceMapping());
-
- xjcDefaultValuesTableItem.setChecked(context.isXjcUseDefaultValues());
- xjcToStringTableItem.setChecked(context.isXjcToString());
- xjcToStringMultiLineTableItem.setChecked(context.isXjcToStringMultiLine());
- xjcToStringSimpleTableItem.setChecked(context.isXjcToStringSimple());
- xjcLocatorTableItem.setChecked(context.isXjcLocator());
- xjcSyncMethodsTableItem.setChecked(context.isXjcSyncMethods());
- xjcMarkGeneratedTableItem.setChecked(context.isXjcMarkGenerated());
- }
-
- public void storeValues() {
- context.setUseDefaultValues(useDefaultValuesButton.getSelection());
- context.setNoAddressBinding(noAddressBindingButton.getSelection());
-
- if (canUpdateAutoNameResolution()) {
- context.setAutoNameResolution(autoNameResolutionButton.getSelection());
- }
-
- context.setGenerateServer(generateServerButton.getSelection());
- context.setGenerateImplementation(generateImplementationButton.getSelection());
- context.setProcessSOAPHeaders(processSOAPHeadersButton.getSelection());
- context.setLoadDefaultNamespacePackageNameMapping(namespacePackageMappingButton.getSelection());
- context.setLoadDefaultExcludesNamepsaceMapping(excludesNamespaceMappingButton.getSelection());
-
- context.setXjcUseDefaultValues(xjcDefaultValuesTableItem.getChecked());
- context.setXjcToString(xjcToStringTableItem.getChecked());
- context.setXjcToStringMultiLine(xjcToStringMultiLineTableItem.getChecked());
- context.setXjcToStringSimple(xjcToStringSimpleTableItem.getChecked());
- context.setXjcLocator(xjcLocatorTableItem.getChecked());
- context.setXjcSyncMethods(xjcSyncMethodsTableItem.getChecked());
- context.setXjcMarkGenerated(xjcMarkGeneratedTableItem.getChecked());
- }
-
- private boolean canUpdateAutoNameResolution() {
- return autoNameResolutionButton != null && CXFModelUtils.isAutoNameResolutionPermitted();
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSDLRuntimePreferencesComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSDLRuntimePreferencesComposite.java
deleted file mode 100644
index ebb5ead..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSDLRuntimePreferencesComposite.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.context.Java2WSPersistentContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-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.Group;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.TabFolder;
-
-public class Java2WSDLRuntimePreferencesComposite extends Composite {
- private Java2WSPersistentContext context = CXFCorePlugin.getDefault().getJava2WSContext();
-
- private Combo soapBindingCombo;
- private Button createXSDImportsButton;
- private TabFolder tabFolder;
-
- public Java2WSDLRuntimePreferencesComposite(Composite parent, int style, TabFolder tabFolder) {
- super(parent, style);
- this.tabFolder = tabFolder;
- }
-
- public void addControls() {
- GridLayout preflayout = new GridLayout(1, true);
- this.setLayout(preflayout);
-
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- this.setLayoutData(gridData);
-
- Group java2wsdlGroup = new Group(this, SWT.SHADOW_IN);
- java2wsdlGroup.setText(CXFUIMessages.JAVA2WSDL_GROUP_LABEL);
- GridLayout java2wslayout = new GridLayout();
- java2wslayout.numColumns = 2;
- java2wsdlGroup.setLayout(java2wslayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- java2wsdlGroup.setLayoutData(gridData);
-
- Java2WSWidgetFactory.createSOAPBindingLabel(java2wsdlGroup);
-
- soapBindingCombo = Java2WSWidgetFactory.createSOAPBingCombo(java2wsdlGroup, context);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- soapBindingCombo.setLayoutData(gridData);
-
- createXSDImportsButton = Java2WSWidgetFactory.createXSDImportsButton(java2wsdlGroup, context);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- createXSDImportsButton.setLayoutData(gridData);
-
- Link link = new Link(this, SWT.NONE);
- link.setText(CXFUIMessages.ANNOTATIONS_PREFERENCES_LINK);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- tabFolder.setSelection(3);
- }
- });
- }
-
- public void setDefaults() {
- if (CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__SOAP12_BINDING)) {
- soapBindingCombo.setText("SOAP 1.2"); //$NON-NLS-1$
- } else {
- soapBindingCombo.setText("SOAP 1.1"); //$NON-NLS-1$
- }
-
- createXSDImportsButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_XSD_IMPORTS));
- }
-
- public void refresh() {
- if (context.isSoap12Binding()) {
- soapBindingCombo.setText("SOAP 1.2"); //$NON-NLS-1$
- } else {
- soapBindingCombo.setText("SOAP 1.1"); //$NON-NLS-1$
- }
- createXSDImportsButton.setSelection(context.isGenerateXSDImports());
- }
-
- public void storeValues() {
- if (soapBindingCombo.getText().equals("SOAP 1.2")) {
- context.setSoap12Binding(true);
- } else {
- context.setSoap12Binding(false);
- }
-
- context.setGenerateXSDImports(createXSDImportsButton.getSelection());
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSRuntimePreferencesComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSRuntimePreferencesComposite.java
deleted file mode 100644
index 9d62ffe..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSRuntimePreferencesComposite.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.context.Java2WSPersistentContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-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.Group;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.TabFolder;
-
-public class Java2WSRuntimePreferencesComposite extends Composite {
- private Java2WSPersistentContext context = CXFCorePlugin.getDefault().getJava2WSContext();
-
- private Combo soapBindingCombo;
- private Button createXSDImportsButton;
-
- private Button generateClientButton;
- private Button generateServerButton;
- private Button generateWrapperFaultBeanButton;
- private Button generateWSDLButton;
-
- private TabFolder tabFolder;
-
- public Java2WSRuntimePreferencesComposite(Composite parent, int style, TabFolder tabFolder) {
- super(parent, style);
- this.tabFolder = tabFolder;
- }
-
- public void addControls() {
- GridLayout preflayout = new GridLayout();
-
- preflayout.numColumns = 2;
- preflayout.marginHeight = 10;
- this.setLayout(preflayout);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- this.setLayoutData(gridData);
-
- // Java2WS Group
- Group java2wsGroup = new Group(this, SWT.SHADOW_IN);
- java2wsGroup.setText(CXFUIMessages.JAVA2WS_GROUP_LABEL);
- GridLayout java2wslayout = new GridLayout();
-
- java2wslayout.numColumns = 3;
-
- java2wslayout.marginHeight = 10;
- java2wsGroup.setLayout(java2wslayout);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- java2wsGroup.setLayoutData(gridData);
-
- // Frontend
- Java2WSWidgetFactory.createFrontendLabel(java2wsGroup);
- Combo frontendCombo = Java2WSWidgetFactory.createFrontendCombo(java2wsGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- frontendCombo.setLayoutData(gridData);
-
- // Databinding
- Java2WSWidgetFactory.createDatabindingLabel(java2wsGroup);
- Combo databindingCombo = Java2WSWidgetFactory.createDatabindingCombo(java2wsGroup, context);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- databindingCombo.setLayoutData(gridData);
-
- // Gen Client
- generateClientButton = Java2WSWidgetFactory.createGenerateClientButton(java2wsGroup, context);
-
- // Gen Server
- generateServerButton = Java2WSWidgetFactory.createGenerateServerButton(java2wsGroup, context);
-
- // Gen Wrapper and Fault Bean
- generateWrapperFaultBeanButton = Java2WSWidgetFactory.createGenerateWrapperFaultBeanButton(
- java2wsGroup, context);
-
- // Gen WSDL
- generateWSDLButton = Java2WSWidgetFactory.createGenerateWSDLButton(java2wsGroup, context);
- generateWSDLButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- enableWSDLGroup(generateWSDLButton.getSelection());
- }
- });
-
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 3;
- generateWSDLButton.setLayoutData(gridData);
-
- Group wsdlGroup = new Group(java2wsGroup, SWT.SHADOW_ETCHED_IN);
- GridLayout wsdlGroupLayout = new GridLayout(2, false);
- wsdlGroup.setLayout(wsdlGroupLayout);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 3;
- wsdlGroup.setLayoutData(gridData);
-
- Java2WSWidgetFactory.createSOAPBindingLabel(wsdlGroup);
-
- soapBindingCombo = Java2WSWidgetFactory.createSOAPBingCombo(wsdlGroup, context);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- soapBindingCombo.setLayoutData(gridData);
-
- createXSDImportsButton = Java2WSWidgetFactory.createXSDImportsButton(wsdlGroup, context);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- createXSDImportsButton.setLayoutData(gridData);
-
- Link link = new Link(this, SWT.NONE);
- link.setText(CXFUIMessages.ANNOTATIONS_PREFERENCES_LINK);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- tabFolder.setSelection(3);
- }
- });
- enableWSDLGroup(context.isGenerateWSDL());
- }
-
- protected void enableWSDLGroup(boolean enable) {
- soapBindingCombo.setEnabled(enable);
- createXSDImportsButton.setEnabled(enable);
- }
-
- public void setDefaults() {
- if (CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__SOAP12_BINDING)) {
- soapBindingCombo.setText("SOAP 1.2"); //$NON-NLS-1$
- } else {
- soapBindingCombo.setText("SOAP 1.1"); //$NON-NLS-1$
- }
-
- createXSDImportsButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_XSD_IMPORTS));
-
- generateClientButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.CXF_CONTEXT,
- CXFPackage.CXF_CONTEXT__GENERATE_CLIENT));
-
- generateServerButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.CXF_CONTEXT,
- CXFPackage.CXF_CONTEXT__GENERATE_SERVER));
-
- generateWrapperFaultBeanButton.setSelection(CXFModelUtils.getDefaultBooleanValue(
- CXFPackage.JAVA2_WS_CONTEXT, CXFPackage.JAVA2_WS_CONTEXT__GENERATE_WRAPPER_FAULT_BEANS));
-
- generateWSDLButton.setSelection(CXFModelUtils.getDefaultBooleanValue(CXFPackage.JAVA2_WS_CONTEXT,
- CXFPackage.JAVA2_WS_CONTEXT__GENERATE_WSDL));
- }
-
- public void refresh() {
- if (context.isSoap12Binding()) {
- soapBindingCombo.setText("SOAP 1.2"); //$NON-NLS-1$
- } else {
- soapBindingCombo.setText("SOAP 1.1"); //$NON-NLS-1$
- }
-
- createXSDImportsButton.setSelection(context.isGenerateXSDImports());
- generateClientButton.setSelection(context.isGenerateClient());
- generateServerButton.setSelection(context.isGenerateServer());
- generateWrapperFaultBeanButton.setSelection(context.isGenerateWrapperFaultBeans());
- generateWSDLButton.setSelection(context.isGenerateWSDL());
- }
-
- public void storeValues() {
- if (soapBindingCombo.getText().equals("SOAP 1.2")) {
- context.setSoap12Binding(true);
- } else {
- context.setSoap12Binding(false);
- }
-
- context.setGenerateXSDImports(createXSDImportsButton.getSelection());
- context.setGenerateClient(generateClientButton.getSelection());
- context.setGenerateServer(generateServerButton.getSelection());
- context.setGenerateWrapperFaultBeans(generateWrapperFaultBeanButton.getSelection());
- context.setGenerateWSDL(generateWSDLButton.getSelection());
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSWidgetFactory.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSWidgetFactory.java
deleted file mode 100644
index 1f4cca1..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/Java2WSWidgetFactory.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.ui.JavaElementLabelProvider;
-import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jst.ws.internal.cxf.core.model.DataBinding;
-import org.eclipse.jst.ws.internal.cxf.core.model.Frontend;
-import org.eclipse.jst.ws.internal.cxf.core.model.Java2WSContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.Java2WSDataModel;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-import org.eclipse.jst.ws.internal.cxf.ui.viewers.JavaViewerFilter;
-import org.eclipse.jst.ws.jaxws.core.utils.JDTUtils;
-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.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-
-/**
- * Provides widgets for Java2WS preferences, wizards, dialogs. Enables the reuse
- * of widgets in multiple locations. Widgets have there labeling and tooltips
- * set here and where possible listeners are set which update instances of
- * <code>Java2WSContext</code> and <code>Java2WSDataModel</code>.
- *
- */
-public final class Java2WSWidgetFactory {
-
- private Java2WSWidgetFactory() {
- }
-
- public static Label createSOAPBindingLabel(Composite parent) {
- Label defaultSoapBinding = new Label(parent, SWT.NONE);
- defaultSoapBinding.setText(CXFUIMessages.JAVA2WS_DEFAULT_SOAPBINDING_LABEL);
- return defaultSoapBinding;
- }
-
- public static Combo createSOAPBingCombo(Composite parent, final Java2WSContext context) {
- Combo soapBindingCombo = new Combo(parent, SWT.READ_ONLY);
- soapBindingCombo.setToolTipText(CXFUIMessages.JAVA2WS_SOAP12_BINDING_TOOLTIP);
- soapBindingCombo.add("SOAP 1.1"); //$NON-NLS-1$
- soapBindingCombo.add("SOAP 1.2"); //$NON-NLS-1$
- soapBindingCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String soapBinding = ((Combo) e.widget).getText();
- if (soapBinding.equals("SOAP 1.2")) { //$NON-NLS-1$
- context.setSoap12Binding(true);
- } else {
- context.setSoap12Binding(false);
- }
- }
- });
- if (context.isSoap12Binding()) {
- soapBindingCombo.setText("SOAP 1.2"); //$NON-NLS-1$
- } else {
- soapBindingCombo.setText("SOAP 1.1"); //$NON-NLS-1$
- }
-
- return soapBindingCombo;
- }
-
- public static Button createXSDImportsButton(Composite parent, final Java2WSContext context) {
- Button createXSDImports = new Button(parent, SWT.CHECK);
- createXSDImports.setText(CXFUIMessages.JAVA2WS_GEN_XSD_IMPORTS);
- createXSDImports.setToolTipText(CXFUIMessages.JAVA2WS_CREATE_XSD_IMPORTS_TOOLTIP);
- createXSDImports.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setGenerateXSDImports(((Button) e.widget).getSelection());
- }
- });
- createXSDImports.setSelection(context.isGenerateXSDImports());
- return createXSDImports;
- }
-
- public static Label createFrontendLabel(Composite parent) {
- Label frontendLabel = new Label(parent, SWT.NONE);
- frontendLabel.setText(CXFUIMessages.CXF_DEFAULT_FRONTEND_LABEL);
- return frontendLabel;
- }
-
- public static Combo createFrontendCombo(Composite parent, final Java2WSContext context) {
- final Combo frontendCombo = new Combo(parent, SWT.READ_ONLY);
- frontendCombo.setToolTipText(CXFUIMessages.JAVA2WS_FRONTEND_TOOLTIP);
- frontendCombo.add(Frontend.JAXWS.getLiteral());
- frontendCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String frontend = frontendCombo.getText();
- context.setFrontend(Frontend.get(frontend));
- if (frontend.equals(Frontend.JAXWS.getLiteral())) {
- context.setDatabinding(DataBinding.get(DataBinding.JAXB.getLiteral()));
- }
- // if (frontend.equals("simple")) {
- // context.setDatabinding("aegis");
- // }
- }
- });
- frontendCombo.setText(context.getFrontend().getLiteral());
-
- return frontendCombo;
- }
-
- public static Label createDatabindingLabel(Composite parent) {
- Label databindingLabel = new Label(parent, SWT.NONE);
- databindingLabel.setText(CXFUIMessages.CXF_DEFAULT_DATABINDING_LABEL);
- return databindingLabel;
- }
-
- public static Combo createDatabindingCombo(Composite parent, final Java2WSContext context) {
- final Combo databindingCombo = new Combo(parent, SWT.READ_ONLY);
- databindingCombo.setToolTipText(CXFUIMessages.JAVA2WS_DATABINDING_TOOLTIP);
- databindingCombo.add(DataBinding.JAXB.getLiteral());
- databindingCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setDatabinding(DataBinding.get(databindingCombo.getText()));
- }
- });
- databindingCombo.setText(context.getDatabinding().getLiteral());
- return databindingCombo;
- }
-
- public static Button createGenerateClientButton(Composite parent, final Java2WSContext context) {
- final Button genClientButton = new Button(parent, SWT.CHECK);
- genClientButton.setText(CXFUIMessages.JAVA2WS_GEN_CLIENT_LABEL);
- genClientButton.setToolTipText(CXFUIMessages.JAVA2WS_GENERATE_CLIENT_TOOLTIP);
- genClientButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setGenerateClient(genClientButton.getSelection());
- }
- });
- genClientButton.setSelection(context.isGenerateClient());
- return genClientButton;
- }
-
- public static Button createGenerateServerButton(Composite parent, final Java2WSContext context) {
- final Button genServerButton = new Button(parent, SWT.CHECK);
- genServerButton.setText(CXFUIMessages.JAVA2WS_GEN_SERVER_LABEL);
- genServerButton.setToolTipText(CXFUIMessages.JAVA2WS_GENERATE_SERVER_TOOLTIP);
- genServerButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setGenerateServer(genServerButton.getSelection());
- }
- });
- genServerButton.setSelection(context.isGenerateServer());
- return genServerButton;
- }
-
- public static Button createGenerateWrapperFaultBeanButton(Composite parent, final Java2WSContext context) {
- final Button genWrapperFaultButton = new Button(parent, SWT.CHECK);
- genWrapperFaultButton.setText(CXFUIMessages.JAVA2WS_GEN_WRAPPER_FAULT_LABEL);
- genWrapperFaultButton.setToolTipText(CXFUIMessages.JAVA2WS_GENERATE_WRAPPERBEAN_TOOLTIP);
- genWrapperFaultButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setGenerateWrapperFaultBeans(genWrapperFaultButton.getSelection());
- }
- });
- genWrapperFaultButton.setSelection(context.isGenerateWrapperFaultBeans());
- return genWrapperFaultButton;
- }
-
- public static Button createGenerateWSDLButton(Composite parent, final Java2WSContext context) {
- final Button genWSDLButton = new Button(parent, SWT.CHECK);
- genWSDLButton.setText(CXFUIMessages.JAVA2WS_GEN_WSDL_LABEL);
- genWSDLButton.setToolTipText(CXFUIMessages.JAVA2WS_GENERATE_WSDL_TOOLTIP);
- genWSDLButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- context.setGenerateWSDL(genWSDLButton.getSelection());
- }
- });
- genWSDLButton.setSelection(context.isGenerateWSDL());
- return genWSDLButton;
- }
-
- public static Label createWSDLFileNameLabel(Composite parent) {
- Label wsdlFileNameLabel = new Label(parent, SWT.NONE);
- wsdlFileNameLabel.setText(CXFUIMessages.JAVA2WS_WSDL_FILE_NAME);
- return wsdlFileNameLabel;
-
- }
-
- public static Text createWSDLFileNameText(Composite parent, final Java2WSDataModel model) {
- final Text wsdlFileText = new Text(parent, SWT.BORDER);
- wsdlFileText.setToolTipText(CXFUIMessages.JAVA2WS_OUTPUT_FILE_TOOLTIP);
- wsdlFileText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- model.setWsdlFileName(wsdlFileText.getText());
- }
- });
- wsdlFileText.setText(model.getWsdlFileName());
- return wsdlFileText;
- }
-
- public static Button createUseSEIButton(Composite parent) {
- Button useSEIButton = new Button(parent, SWT.CHECK);
- useSEIButton.setText(CXFUIMessages.JAVA2WS_USE_SEI_BUTTON);
- return useSEIButton;
- }
-
- // public static Label createInformationLabel(Composite parent, IType startingPointType) {
- // Label infoLabel = new Label(parent, SWT.WRAP);
- // infoLabel.setText(CXFUIMessages.bind(CXFUIMessages.JAVA2WS_USE_SEI_INFO_LABEL, startingPointType
- // .getElementName()));
- // return infoLabel;
- // }
-
- public static Label createPaddingLabel(Composite parent) {
- return new Label(parent, SWT.NONE);
- }
-
- public static Button createSelectSEIButton(Composite parent) {
- Button selectSEIButton = new Button(parent, SWT.RADIO);
- selectSEIButton.setText(CXFUIMessages.JAVA2WS_SELECT_SEI_LABEL);
- return selectSEIButton;
- }
-
- public static Label createSelectSEILabel(Composite parent) {
- Label selectSEILabel = new Label(parent, SWT.NONE);
- selectSEILabel.setText(CXFUIMessages.JAVA2WS_SELECT_SEI_LABEL);
- return selectSEILabel;
- }
-
- public static Combo createSelectSEICombo(Composite parent, final Java2WSDataModel model,
- IType javaStartingPointType) {
- final Combo seiCombo = new Combo(parent, SWT.BORDER);
- seiCombo.setToolTipText(CXFUIMessages.JAVA2WS_SELECT_SEI_TOOLTIP);
-
- IJavaProject javaProject = JDTUtils.getJavaProject(model.getProjectName());
- try {
- ITypeHierarchy typeHierarchy = javaStartingPointType.newTypeHierarchy(javaProject, null);
- IType[] allInterfaces = typeHierarchy.getAllInterfaces();
- for (int i = 0; i < allInterfaces.length; i++) {
- IType itype = allInterfaces[i];
- if (!itype.isBinary() && itype.getResource().getProject().equals(javaProject.getProject())) {
- seiCombo.add(itype.getFullyQualifiedName());
- }
- }
- } catch (JavaModelException jme) {
- CXFUIPlugin.log(jme.getStatus());
- }
-
- seiCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- String seiInterfaceName = seiCombo.getText();
- model.setFullyQualifiedJavaInterfaceName(seiInterfaceName);
- }
- });
-
- seiCombo.deselectAll();
- return seiCombo;
- }
-
- public static Button createBrowseButton(Composite parent) {
- Button browseButton = new Button(parent, SWT.PUSH);
- browseButton.setText(CXFUIMessages.JAVA2WS_BROWSE_LABEL);
- return browseButton;
- }
-
- public static Button createExtractSEIButton(Composite parent) {
- Button extractSEIButton = new Button(parent, SWT.RADIO);
- extractSEIButton.setText(CXFUIMessages.JAVA2WS_EXTRACT_SEI_LABEL);
- return extractSEIButton;
- }
-
- public static Label createExtractSEILabel(Composite parent) {
- Label extractSEILabel = new Label(parent, SWT.NONE);
- extractSEILabel.setText(CXFUIMessages.JAVA2WS_EXTRACT_SEI_LABEL);
- return extractSEILabel;
- }
-
- public static Text createSEIInterfaceNameText(Composite parent) {
- Text seiInterfaceNameText = new Text(parent, SWT.BORDER);
- seiInterfaceNameText.setToolTipText(CXFUIMessages.JAVA2WS_EXTRACT_SEI_TOOLTIP);
- return seiInterfaceNameText;
- }
-
- public static Label createMemebersToExtractLabel(Composite parent) {
- Label seiMembersToExtractLabel = new Label(parent, SWT.NONE);
- seiMembersToExtractLabel.setText(CXFUIMessages.JAVA2WS_EXTRACT_MEMBERS_LABEL);
- return seiMembersToExtractLabel;
- }
-
- public static CheckboxTableViewer createSEIMembersToExtractTableViewer(Composite parent) {
- CheckboxTableViewer seiMembersToExtractTableViewer = CheckboxTableViewer.newCheckList(parent,
- SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- seiMembersToExtractTableViewer.setLabelProvider(new JavaElementLabelProvider());
- seiMembersToExtractTableViewer.setContentProvider(new ArrayContentProvider());
- return seiMembersToExtractTableViewer;
- }
-
- public static Button createSelectAllButton(Composite parent) {
- Button selectAllButton = new Button(parent, SWT.PUSH);
- selectAllButton.setText(CXFUIMessages.JAVA2WS_SELECT_ALL_BUTTON);
- return selectAllButton;
- }
-
- public static Button createDeselectAllButton(Composite parent) {
- Button deselectAllButton = new Button(parent, SWT.PUSH);
- deselectAllButton.setText(CXFUIMessages.JAVA2WS_DESELECT_ALL_BUTTON);
- return deselectAllButton;
- }
-
- public static Label createSelectImplementationLabel(Composite parent) {
- Label selectImplementationLabel = new Label(parent, SWT.NONE);
- selectImplementationLabel.setText(CXFUIMessages.JAVA2WS_SELECT_IMPLEMENTATION);
- return selectImplementationLabel;
- }
-
- public static Combo createSelectImplementationCombo(Composite parent,
- final Java2WSDataModel model, IType javaStartingPointType) {
- final Combo selectImplementationCombo = new Combo(parent, SWT.BORDER);
- selectImplementationCombo.setToolTipText(CXFUIMessages.JAVA2WS_SELECT_IMPLEMENTATION_TOOLTIP);
-
- IJavaProject javaProject = JDTUtils.getJavaProject(model.getProjectName());
- try {
- ITypeHierarchy typeHierarchy = javaStartingPointType.newTypeHierarchy(javaProject, null);
- IType[] allImplementations = typeHierarchy.getAllSubtypes(javaStartingPointType);
- for (int i = 0; i < allImplementations.length; i++) {
- IType itype = allImplementations[i];
- if (!itype.isBinary() && itype.getResource().getProject().equals(javaProject.getProject())) {
- String packageName = itype.getPackageFragment().getElementName();
- if (packageName.trim().length() > 0) {
- packageName += "."; //$NON-NLS-1$
- }
- String qualifiedName = packageName + itype.getPrimaryElement().getElementName();
- selectImplementationCombo.add(qualifiedName);
- }
- }
- } catch (JavaModelException jme) {
- CXFUIPlugin.log(jme.getStatus());
- }
-
- selectImplementationCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- String implementationName = selectImplementationCombo.getText();
- model.setFullyQualifiedJavaClassName(implementationName);
- }
- });
-
- selectImplementationCombo.deselectAll();
- return selectImplementationCombo;
- }
-
- /**
- * Creates an <code>ElementTreeSelectionDialog</code> that displays all the classes or all the interfaces
- * within a <code>IJavaProject</code> allowing one class or interface to be selected.
- *
- * @param parent the parent shell
- * @param title the dialog title
- * @param message the dialog message
- * @param javaProject the java project that is filtered
- * @param elementKinds a flag defining nature of searched elements; the only valid values are:
- * <code>IJavaSearchConstants.CLASS</code>
- * <code>IJavaSearchConstants.INTERFACE</code>
- * <code>IJavaSearchConstants.CLASS_AND_INTERFACE</code>
- *
- * @return the element tree selection dialog
- */
- public static ElementTreeSelectionDialog createElementTreeSelectionDialog(Shell parent, String title,
- String message, IJavaProject javaProject, int elementKinds) {
- ElementTreeSelectionDialog selectionDialog = new ElementTreeSelectionDialog(parent,
- new JavaElementLabelProvider(), new StandardJavaElementContentProvider());
- selectionDialog.setTitle(title);
- selectionDialog.setMessage(message);
- selectionDialog.setAllowMultiple(false);
- selectionDialog.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()));
-
- selectionDialog.addFilter(new JavaViewerFilter(javaProject, elementKinds));
-
- selectionDialog.setValidator(new ISelectionStatusValidator() {
-
- public IStatus validate(Object[] selection) {
- if (selection.length == 1) {
- if (selection[0] instanceof ICompilationUnit) {
- return new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
- }
- }
- return new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
- }
- });
-
- return selectionDialog;
-
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/SpringConfigComposite.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/SpringConfigComposite.java
deleted file mode 100644
index d04358c..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/SpringConfigComposite.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFPackage;
-import org.eclipse.jst.ws.internal.cxf.core.utils.CXFModelUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-public class SpringConfigComposite extends Composite {
- private CXFContext context = CXFCorePlugin.getDefault().getJava2WSContext();
-
- private Button useCXFServletButton;
- private Button useSpringAppContextButton;
-
- public SpringConfigComposite(Composite parent, int style) {
- super(parent, style);
- addControls();
- }
-
- private void addControls() {
- GridLayout preflayout = new GridLayout(1, true);
- this.setLayout(preflayout);
-
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- this.setLayoutData(gridData);
-
- Group springConfigGroup = new Group(this, SWT.SHADOW_IN);
- springConfigGroup.setText(CXFUIMessages.SPRING_CONFIG_GROUP_LABEL);
- GridLayout springConfigLayout = new GridLayout(2, true);
- springConfigGroup.setLayout(springConfigLayout);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- springConfigGroup.setLayoutData(gridData);
-
- useCXFServletButton = new Button(springConfigGroup, SWT.RADIO);
- useCXFServletButton.setText(CXFUIMessages.SPRING_CONFIG_USE_CXF_SERVLET);
- useCXFServletButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setUseSpringApplicationContext(!selected);
- }
- });
-
- useSpringAppContextButton = new Button(springConfigGroup, SWT.RADIO);
- useSpringAppContextButton
- .setText(CXFUIMessages.SPRING_CONFIG_USE_CXF_SPRING_APPLICATION_CONTEXT);
- useSpringAppContextButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- boolean selected = ((Button) e.widget).getSelection();
- context.setUseSpringApplicationContext(selected);
- }
- });
-
- if (context.isUseSpringApplicationContext()) {
- useSpringAppContextButton.setSelection(true);
- } else {
- useCXFServletButton.setSelection(true);
- }
- }
-
- public void setDefaults() {
- boolean useSpringAppcontext = CXFModelUtils.getDefaultBooleanValue(CXFPackage.CXF_CONTEXT,
- CXFPackage.CXF_CONTEXT__USE_SPRING_APPLICATION_CONTEXT);
- useSpringAppContextButton.setSelection(useSpringAppcontext);
- useCXFServletButton.setSelection(!useSpringAppcontext);
- }
-
- public void storeValues() {
- context.setUseSpringApplicationContext(useSpringAppContextButton.getSelection());
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/WSDL2JavaWidgetFactory.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/WSDL2JavaWidgetFactory.java
deleted file mode 100644
index 7e4cac7..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/widgets/WSDL2JavaWidgetFactory.java
+++ /dev/null
@@ -1,623 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IONA Technologies PLC
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IONA Technologies PLC - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.widgets;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Service;
-import javax.xml.namespace.QName;
-
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jst.ws.internal.cxf.core.model.WSDL2JavaContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.WSDL2JavaDataModel;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-import org.eclipse.jst.ws.internal.cxf.ui.dialogs.ResourceSelectionDialog;
-import org.eclipse.jst.ws.internal.cxf.ui.viewers.PackageNameColumnLabelProvider;
-import org.eclipse.jst.ws.jaxws.core.utils.JDTUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.SelectionDialog;
-
-/**
- * Provides widgets for WSDL2Java preferences, wizards, dialogs. Enables the
- * reuse of widgets in multiple locations. Widgets have there labeling and
- * tooltips set here and where possible listeners are set which update instances
- * of <code>WSDL2JavaContext</code> and <code>WSDL2JavaDataModel</code>.
- *
- */
-public final class WSDL2JavaWidgetFactory {
- private static final String XJC_DV_ARG = "-Xdv"; //$NON-NLS-1$
- private static final String XJC_TS_ARG = "-Xts"; //$NON-NLS-1$
- private static final String XJC_TS_MULTI_ARG = "-Xts:style:multiline"; //$NON-NLS-1$
- private static final String XJC_TS_SIMPLE = "-Xts:style:simple"; //$NON-NLS-1$
- private static final String XJC_LOCATOR_ARG = "-Xlocator"; //$NON-NLS-1$
- private static final String XJC_SYNC_METHODS_ARG = "-Xsync-methods"; //$NON-NLS-1$
- private static final String XJC_MARK_GENERATED_ARG = "-mark-generated"; //$NON-NLS-1$
- private static final String XJC_EPISODE_FILE_ARG = "-episode"; //$NON-NLS-1$
-
- private WSDL2JavaWidgetFactory() {
- }
-
- public static Button createGenerateClientButton(Composite parent, final WSDL2JavaContext model) {
- final Button genClientButton = new Button(parent, SWT.CHECK);
- genClientButton.setText(CXFUIMessages.JAVA2WS_GEN_CLIENT_LABEL);
- genClientButton.setToolTipText(CXFUIMessages.WSDL2JAVA_GENERATE_CLIENT_TOOLTIP);
- genClientButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setGenerateClient(genClientButton.getSelection());
- }
- });
- genClientButton.setSelection(model.isGenerateClient());
- return genClientButton;
- }
-
- public static Button createGenerateServerButton(Composite parent, final WSDL2JavaContext model) {
- final Button genServerButton = new Button(parent, SWT.CHECK);
- genServerButton.setText(CXFUIMessages.JAVA2WS_GEN_SERVER_LABEL);
- genServerButton.setToolTipText(CXFUIMessages.WSDL2JAVA_GENERATE_SERVER_TOOLTIP);
- genServerButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setGenerateServer(genServerButton.getSelection());
- }
- });
- genServerButton.setSelection(model.isGenerateServer());
- return genServerButton;
- }
-
- public static Button createGenerateImplementationButton(Composite parent, final WSDL2JavaContext model) {
- final Button genImplementatinButton = new Button(parent, SWT.CHECK);
- genImplementatinButton.setText(CXFUIMessages.JAVA2WS_GEN_IMPLEMENTATION_LABEL);
- genImplementatinButton.setToolTipText(CXFUIMessages.WSDL2JAVA_GENERATE_IMPLEMENTATION_TOOLTIP);
- genImplementatinButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setGenerateImplementation(genImplementatinButton.getSelection());
- }
- });
- genImplementatinButton.setSelection(model.isGenerateImplementation());
- return genImplementatinButton;
- }
-
- public static Button createProcessSOAPHeadersButton(Composite parent, final WSDL2JavaContext model) {
- final Button processSOAPHeadersButton = new Button(parent, SWT.CHECK);
- processSOAPHeadersButton.setText(CXFUIMessages.WSDL2JAVA_PROCESS_SOAP_HEADERS);
- processSOAPHeadersButton.setToolTipText(CXFUIMessages.WSDL2JAVA_PROCESS_SOAP_HEADERS_TOOLTIP);
- processSOAPHeadersButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setProcessSOAPHeaders(processSOAPHeadersButton.getSelection());
- }
- });
- processSOAPHeadersButton.setSelection(model.isProcessSOAPHeaders());
- return processSOAPHeadersButton;
- }
-
- public static Button createNamespacePackageMappingButton(Composite parent, final WSDL2JavaContext model) {
- final Button namespacePackageMappingButton = new Button(parent, SWT.CHECK);
- namespacePackageMappingButton
- .setText(CXFUIMessages.WSDL2JAVA_LOAD_DEFAULT_NAMESPACE_PACKAGE_MAPPING);
- namespacePackageMappingButton
- .setToolTipText(CXFUIMessages.WSDL2JAVA_DEFAULT_NAMESPACE_LOADING_TOOLTIP);
- namespacePackageMappingButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setLoadDefaultNamespacePackageNameMapping(namespacePackageMappingButton.getSelection());
- }
- });
- namespacePackageMappingButton.setSelection(model.isLoadDefaultNamespacePackageNameMapping());
- return namespacePackageMappingButton;
- }
-
- public static Button createExcludesNamespaceMappingButton(Composite parent, final WSDL2JavaContext model) {
- final Button excludesNamespaceMappingButton = new Button(parent, SWT.CHECK);
- excludesNamespaceMappingButton
- .setText(CXFUIMessages.WSDL2JAVA_USE_DEFAULT_EXCLUDES_NAMESPACE_MAPPING);
- excludesNamespaceMappingButton
- .setToolTipText(CXFUIMessages.WSDL2JAVA_EXCLUDE_NAMESPACE_LOADING_TOOLTIP);
- excludesNamespaceMappingButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setLoadDefaultExcludesNamepsaceMapping(excludesNamespaceMappingButton.getSelection());
- }
- });
- excludesNamespaceMappingButton.setSelection(model.isLoadDefaultExcludesNamepsaceMapping());
- return excludesNamespaceMappingButton;
- }
-
- public static Button createNoAddressBindingButton(Composite parent, final WSDL2JavaContext model) {
- final Button noAddressBindingButton = new Button(parent, SWT.CHECK);
- noAddressBindingButton.setText(CXFUIMessages.bind(CXFUIMessages.WSDL2JAVA_NO_ADDRESS_BINDING,
- model.getDefaultRuntimeType()));
- noAddressBindingButton.setToolTipText(
- CXFUIMessages.bind(CXFUIMessages.WSDL2JAVA_NO_ADDRESS_BINDING_TOOLTIP,
- model.getDefaultRuntimeType()));
- noAddressBindingButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setNoAddressBinding(noAddressBindingButton.getSelection());
- }
- });
- noAddressBindingButton.setSelection(model.isNoAddressBinding());
- return noAddressBindingButton;
- }
-
- public static Button createAutoNameResolutionButton(Composite parent, final WSDL2JavaContext model) {
- final Button autoNameResolutionButton = new Button(parent, SWT.CHECK);
- autoNameResolutionButton.setText(CXFUIMessages.WSDL2JAVA_AUTO_NAME_RESOLUTION);
- autoNameResolutionButton.setToolTipText(CXFUIMessages.WSDL2JAVA_AUTO_NAME_RESOLUTION_TOOLTIP);
- autoNameResolutionButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setAutoNameResolution(autoNameResolutionButton.getSelection());
- }
- });
- autoNameResolutionButton.setSelection(model.isAutoNameResolution());
- return autoNameResolutionButton;
- }
-
- public static TableItem createXJCDefaultValuesTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcDefaultValuesItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcDefaultValuesItem.setText(0, XJC_DV_ARG);
- xjcDefaultValuesItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_DEFAULT_VALUES);
- xjcDefaultValuesItem.setChecked(model.isXjcUseDefaultValues());
- return xjcDefaultValuesItem;
- }
-
- public static TableItem createXJCToStringTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcToStringItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcToStringItem.setText(0, XJC_TS_ARG);
- xjcToStringItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_TOSTRING);
- xjcToStringItem.setChecked(model.isXjcToString());
- return xjcToStringItem;
- }
-
- public static TableItem createXJCToStringMultiLineTableItem(Table xjcArgsTable,
- final WSDL2JavaContext model) {
- TableItem xjcToStringMultiLineItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcToStringMultiLineItem.setText(0, XJC_TS_MULTI_ARG);
- xjcToStringMultiLineItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_TOSTRING_MULTILINE);
- xjcToStringMultiLineItem.setChecked(model.isXjcToStringMultiLine());
- return xjcToStringMultiLineItem;
- }
-
- public static TableItem createXJCToStringSimpleTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcToStringSimpleItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcToStringSimpleItem.setText(0, XJC_TS_SIMPLE);
- xjcToStringSimpleItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_TOSTRING_SIMPLE);
- xjcToStringSimpleItem.setChecked(model.isXjcToStringSimple());
- return xjcToStringSimpleItem;
- }
-
- public static TableItem createXJCLocatorTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcLocatorItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcLocatorItem.setText(0, XJC_LOCATOR_ARG);
- xjcLocatorItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_LOCATOR);
- xjcLocatorItem.setChecked(model.isXjcLocator());
- return xjcLocatorItem;
- }
-
- public static TableItem createXJCSyncMethodsTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcSyncMethodsItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcSyncMethodsItem.setText(0, XJC_SYNC_METHODS_ARG);
- xjcSyncMethodsItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_SYNC_METHODS);
- xjcSyncMethodsItem.setChecked(model.isXjcSyncMethods());
- return xjcSyncMethodsItem;
- }
-
- public static TableItem createXJCMarkGeneratedTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcMarkGeneratedItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcMarkGeneratedItem.setText(0, XJC_MARK_GENERATED_ARG);
- xjcMarkGeneratedItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_MARK_GENERATED);
- xjcMarkGeneratedItem.setChecked(model.isXjcMarkGenerated());
- return xjcMarkGeneratedItem;
- }
-
- public static TableItem createXJCEpisodeFileTableItem(Table xjcArgsTable, final WSDL2JavaContext model) {
- TableItem xjcEpisodeFileItem = new TableItem(xjcArgsTable, SWT.NONE);
- xjcEpisodeFileItem.setText(0, XJC_EPISODE_FILE_ARG);
- xjcEpisodeFileItem.setText(1, CXFUIMessages.WSDL2JAVA_XJC_EPISODE_FILE);
- return xjcEpisodeFileItem;
- }
-
- public static Table createXJCArgTable(Composite parent, final WSDL2JavaContext model) {
- Table xjcArgsTable = new Table(parent, SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
- xjcArgsTable.setToolTipText(CXFUIMessages.WSDL2JAVA_XJC_ARGS_TOOLTIP);
- xjcArgsTable.setLinesVisible(true);
- xjcArgsTable.setHeaderVisible(true);
-
- TableLayout tableLayout = new TableLayout();
- xjcArgsTable.setLayout(tableLayout);
-
- TableColumn xjcArgColumn = new TableColumn(xjcArgsTable, SWT.NONE);
- xjcArgColumn.setText(CXFUIMessages.WSDL2JAVA_XJC_ARG_COLUMN_NAME);
-
- ColumnWeightData columnWeightData = new ColumnWeightData(100, 100, true);
- tableLayout.addColumnData(columnWeightData);
-
- TableColumn descriptionColumn = new TableColumn(xjcArgsTable, SWT.NONE);
- descriptionColumn.setText(CXFUIMessages.WSDL2JAVA_XJC_DESCRIPTION_COLUMN_NAME);
- columnWeightData = new ColumnWeightData(200, 200, true);
- tableLayout.addColumnData(columnWeightData);
-
- xjcArgsTable.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- if (event.detail == SWT.CHECK) {
- TableItem tableItem = (TableItem) event.item;
- String xjcArg = tableItem.getText(0);
- boolean checked = tableItem.getChecked();
- if (xjcArg.equals(XJC_DV_ARG)) {
- model.setXjcUseDefaultValues(checked);
- }
-
- if (xjcArg.equals(XJC_TS_ARG)) {
- model.setXjcToString(checked);
- }
-
- if (xjcArg.equals(XJC_TS_MULTI_ARG)) {
- model.setXjcToStringMultiLine(checked);
- }
-
- if (xjcArg.equals(XJC_TS_SIMPLE)) {
- model.setXjcToStringSimple(checked);
- }
-
- if (xjcArg.equals(XJC_LOCATOR_ARG)) {
- model.setXjcLocator(checked);
- }
-
- if (xjcArg.equals(XJC_SYNC_METHODS_ARG)) {
- model.setXjcSyncMethods(checked);
- }
-
- if (xjcArg.equals(XJC_MARK_GENERATED_ARG)) {
- model.setXjcMarkGenerated(checked);
- }
- }
- }
-
- });
-
- xjcArgColumn.pack();
- descriptionColumn.pack();
-
- return xjcArgsTable;
- }
-
- public static Label createFrontendLabel(Composite parent) {
- Label frontendLabel = new Label(parent, SWT.NONE);
- frontendLabel.setText(CXFUIMessages.CXF_DEFAULT_FRONTEND_LABEL);
- return frontendLabel;
- }
-
- public static Combo createFrontendCombo(Composite parent, final WSDL2JavaContext model) {
- final Combo frontendCombo = new Combo(parent, SWT.READ_ONLY);
- frontendCombo.setToolTipText(CXFUIMessages.WSDL2JAVA_FRONTEND_TOOLTIP);
- frontendCombo.add(model.getFrontend().getLiteral());
- frontendCombo.setEnabled(false);
- frontendCombo.select(0);
- return frontendCombo;
- }
-
- public static Label createDatabindingLabel(Composite parent) {
- Label databindingLabel = new Label(parent, SWT.NONE);
- databindingLabel.setText(CXFUIMessages.CXF_DEFAULT_DATABINDING_LABEL);
- return databindingLabel;
- }
-
- public static Combo createDatabindingCombo(Composite parent, final WSDL2JavaContext model) {
- final Combo databindingCombo = new Combo(parent, SWT.READ_ONLY);
- databindingCombo.setToolTipText(CXFUIMessages.WSDL2JAVA_DATABINDING_TOOLTIP);
- databindingCombo.add(model.getDatabinding().getLiteral());
- databindingCombo.setEnabled(false);
- databindingCombo.select(0);
- return databindingCombo;
- }
-
- public static Label createWSDLVersionLabel(Composite parent) {
- Label wsdlVersionLabel = new Label(parent, SWT.NONE);
- wsdlVersionLabel.setText(CXFUIMessages.WSDL2JAVA_WSDL_VERSION_LABEL);
- return wsdlVersionLabel;
- }
-
- public static Combo createWSDLVersionCombo(Composite parent, final WSDL2JavaContext model) {
- final Combo wsdlVersionCombo = new Combo(parent, SWT.READ_ONLY);
- wsdlVersionCombo.setToolTipText(CXFUIMessages.WSDL2JAVA_WSDL_VERSION_TOOLTIP);
- wsdlVersionCombo.add(model.getWsdlVersion());
- wsdlVersionCombo.setEnabled(false);
- wsdlVersionCombo.select(0);
- return wsdlVersionCombo;
- }
-
- public static Button createDefaultValuesButton(Composite parent, final WSDL2JavaContext model) {
- final Button useDefaultValuesButton = new Button(parent, SWT.CHECK);
- useDefaultValuesButton.setText(CXFUIMessages.WSDL2JAVA_USE_DEFAULT_VALUES);
- useDefaultValuesButton.setToolTipText(CXFUIMessages.WSDL2JAVA_DEFAULT_VALUES_TOOLTIP);
- useDefaultValuesButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- model.setUseDefaultValues(useDefaultValuesButton.getSelection());
- }
- });
- useDefaultValuesButton.setSelection(model.isUseDefaultValues());
- return useDefaultValuesButton;
- }
-
- public static Label createOutputDirectoryLabel(Composite parent) {
- Label srcDirLabel = new Label(parent, SWT.NONE);
- srcDirLabel.setText(CXFUIMessages.WSDL2JAVA_OUTPUT_DIRECTORY);
- srcDirLabel.setToolTipText(CXFUIMessages.WSDL2JAVA_OUTPUT_DIRECTORY_TOOLTIP);
- return srcDirLabel;
- }
-
- public static Combo createOutputDirectoryCombo(Composite parent, final WSDL2JavaDataModel model) {
- final Combo outputDirCombo = new Combo(parent, SWT.READ_ONLY);
- outputDirCombo.setToolTipText(CXFUIMessages.WSDL2JAVA_OUTPUT_DIRECTORY_TOOLTIP);
- outputDirCombo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- String javaSourceFolder = outputDirCombo.getText();
- model.setJavaSourceFolder(javaSourceFolder);
- }
- });
-
- populateOutputDirectoryCombo(outputDirCombo, model.getProjectName());
-
- return outputDirCombo;
- }
-
- public static void populateOutputDirectoryCombo(Combo outputDirCombo, String projectName) {
- outputDirCombo.removeAll();
- try {
- IPackageFragmentRoot[] packageFragmentRoots = JDTUtils.getJavaProject(projectName)
- .getAllPackageFragmentRoots();
- for (int i = 0; i < packageFragmentRoots.length; i++) {
- IPackageFragmentRoot packageFragmentRoot = packageFragmentRoots[i];
- if (packageFragmentRoot.getKind() == IPackageFragmentRoot.K_SOURCE) {
- outputDirCombo.add(packageFragmentRoot.getResource().getFullPath().toOSString());
- }
- }
- outputDirCombo.select(0);
- } catch (JavaModelException jme) {
- CXFUIPlugin.log(jme.getStatus());
- }
- }
-
- public static Label createPackageNameLabel(Composite parent) {
- Label packageNameLabel = new Label(parent, SWT.NONE);
- packageNameLabel.setText(CXFUIMessages.WSDL2JAVA_PACKAGE_NAME);
- packageNameLabel.setToolTipText(CXFUIMessages.WSDL2JAVA_PACKAGE_NAME_TOOLTIP);
- return packageNameLabel;
- }
-
- public static Text createPackageNameText(Composite parent, final WSDL2JavaDataModel model) {
- final Text packageNameText = new Text(parent, SWT.BORDER);
- packageNameText.setToolTipText(CXFUIMessages.WSDL2JAVA_PACKAGE_NAME_TOOLTIP);
-
- packageNameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String packageName = packageNameText.getText();
- model.getIncludedNamespaces().put(model.getTargetNamespace(), packageName);
- }
- });
-
- packageNameText.setText(model.getIncludedNamespaces().get(model.getTargetNamespace()));
-
- return packageNameText;
- }
-
- public static Button createNamespacePackageMappingButton(Composite parent) {
- final Button namespaceMappingButton = new Button(parent, SWT.CHECK);
- namespaceMappingButton.setText(CXFUIMessages.WSDL2JAVA_PACKAGE_NAME_OPTIONAL);
- namespaceMappingButton.setToolTipText(CXFUIMessages.WSDL2JAVA_PACKAGE_NAME_OPTIONAL_TOOLTIP);
- return namespaceMappingButton;
- }
-
- public static TableViewerColumn createWSDLNamespaceViewerColumn(TableViewer tableViewer) {
- TableViewerColumn wsdlNamespaceViewerColumn = new TableViewerColumn(tableViewer, SWT.LEFT);
- wsdlNamespaceViewerColumn.setLabelProvider(new ColumnLabelProvider() {
-
- @Override
- public String getText(Object element) {
- return element.toString();
- }
- });
- TableColumn wsdlNamespaceColumn = wsdlNamespaceViewerColumn.getColumn();
- wsdlNamespaceColumn.setText(CXFUIMessages.WSDL2JAVA_WSDL_NAMESPACE_COLUMN_HEADER);
- wsdlNamespaceColumn.pack();
- return wsdlNamespaceViewerColumn;
- }
-
- public static TableViewerColumn createPackageNameColumn(TableViewer tableViewer, WSDL2JavaDataModel model) {
- TableViewerColumn packageNameViewerColumn = new TableViewerColumn(tableViewer, SWT.LEFT);
- packageNameViewerColumn.setLabelProvider(new PackageNameColumnLabelProvider(model));
-
- TableColumn packageNameColumn = packageNameViewerColumn.getColumn();
- packageNameColumn.setText(CXFUIMessages.WSDL2JAVA_PACKAGE_NAME_COLUMN_HEADER);
- packageNameColumn.pack();
- return packageNameViewerColumn;
- }
-
- public static Label createServiceNameLabel(Composite parent) {
- Label serviceNameLabel = new Label(parent, SWT.NONE);
- serviceNameLabel.setText(CXFUIMessages.WSDL2JAVA_SERVICE_NAME);
- serviceNameLabel.setToolTipText(CXFUIMessages.WSDL2JAVA_SERVICE_NAME_TOOLTIP);
- return serviceNameLabel;
- }
-
- public static Combo createServiceNameCombo(Composite parent, final WSDL2JavaDataModel model) {
- final Combo serviceNameCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- serviceNameCombo.setToolTipText(CXFUIMessages.WSDL2JAVA_SERVICE_NAME_TOOLTIP);
-
- serviceNameCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- model.setServiceName(serviceNameCombo.getText());
- }
- });
-
- populateServiceNameCombo(serviceNameCombo, model);
-
- return serviceNameCombo;
- }
-
- @SuppressWarnings("unchecked")
- public static void populateServiceNameCombo(Combo serviceNameCombo, WSDL2JavaDataModel model) {
- serviceNameCombo.removeAll();
- Definition definition = model.getWsdlDefinition();
- if (definition != null) {
- Map servicesMap = definition.getServices();
- if (servicesMap != null) {
- Set servicesEntrySet = servicesMap.entrySet();
- Iterator servicesIterator = servicesEntrySet.iterator();
- while (servicesIterator.hasNext()) {
- Map.Entry serviceEntry = (Map.Entry) servicesIterator.next();
- Service service = (Service) serviceEntry.getValue();
- QName qName = service.getQName();
- serviceNameCombo.add(qName.getLocalPart());
- }
- serviceNameCombo.deselectAll();
- }
- }
- }
-
- public static Label createBindingFilesLabel(Composite parent) {
- Label bindingFilesLabel = new Label(parent, SWT.NONE);
- bindingFilesLabel.setText(CXFUIMessages.WSDL2JAVA_BINDING_FILES);
- bindingFilesLabel.setToolTipText(CXFUIMessages.WSDL2JAVA_BINDING_NAME_TOOLTIP);
- return bindingFilesLabel;
- }
-
- public static List createBindingFilesList(Composite parent) {
- final List bindingFilesList = new List(parent, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- bindingFilesList.setToolTipText(CXFUIMessages.WSDL2JAVA_BINDING_NAME_TOOLTIP);
- return bindingFilesList;
- }
-
- public static Button createAddBindingFileButton(final Composite parent, final WSDL2JavaDataModel model,
- final List bindingFilesList) {
- Button addBindingFileButton = new Button(parent, SWT.PUSH);
- addBindingFileButton.setText(CXFUIMessages.WSDL2JAVA_BINDING_FILES_ADD);
- addBindingFileButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- ResourceSelectionDialog selectionDialog = new ResourceSelectionDialog(
- parent.getShell(),
- "xml", //$NON-NLS-1$
- CXFUIMessages.WSDL2JAVA_BINDING_FILE_DIALOG_FILTER_NAME,
- CXFUIMessages.WSDL2JAVA_BINDING_FILE_DIALOG_TITLE);
- selectionDialog.setMessage(CXFUIMessages.WSDL2JAVA_BINDING_FILE_DIALOG_MESSAGE);
- if (selectionDialog.open() == SelectionDialog.OK) {
- String result = selectionDialog.getResult()[0].toString();
- if (!model.getBindingFiles().contains(result)) {
- model.getBindingFiles().add(result);
- bindingFilesList.add(result);
- }
- }
- }
- });
- return addBindingFileButton;
- }
-
- public static Button createRemoveBindingFileButton(Composite parent, final WSDL2JavaDataModel model,
- final List bindingFilesList) {
- final Button removeBindingFileButton = new Button(parent, SWT.PUSH);
- removeBindingFileButton.setText(CXFUIMessages.WSDL2JAVA_BINDING_FILES_REMOVE);
- removeBindingFileButton.setEnabled(false);
- removeBindingFileButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- String[] selectedBindingFiles = bindingFilesList.getSelection();
- for (String bindingFile : selectedBindingFiles) {
- bindingFilesList.remove(bindingFile);
- model.getBindingFiles().remove(bindingFile);
- }
-
- if (bindingFilesList.getItemCount() == 0) {
- removeBindingFileButton.setEnabled(false);
- }
- }
- });
-
- bindingFilesList.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent event) {
- if (bindingFilesList.getItemCount() == 0) {
- removeBindingFileButton.setEnabled(false);
- } else {
- removeBindingFileButton.setEnabled(true);
- }
- }
- });
-
- return removeBindingFileButton;
- }
-
- public static Label createPaddingLabel(Composite parent) {
- return new Label(parent, SWT.NONE);
- }
-
- public static Label createXMLCatalogLabel(Composite parent) {
- Label xmlCatalogLabel = new Label(parent, SWT.NONE);
- xmlCatalogLabel.setText(CXFUIMessages.WSDL2JAVA_XML_CATLOG);
- xmlCatalogLabel.setToolTipText(CXFUIMessages.WSDL2JAVA_XML_CATALOG_TOOLTIP);
- return xmlCatalogLabel;
- }
-
- public static Text createXMLCatalogText(Composite parent, final WSDL2JavaDataModel model) {
- final Text xmlCatalogText = new Text(parent, SWT.BORDER);
- xmlCatalogText.setToolTipText(CXFUIMessages.WSDL2JAVA_XML_CATALOG_TOOLTIP);
- xmlCatalogText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String xmlCatalog = xmlCatalogText.getText();
- model.setCatalogFile(xmlCatalog);
- }
- });
-
- return xmlCatalogText;
- }
-
- public static Button createXMLCatalogBrowseButton(Composite parent) {
- Button xmlCatalogBrowseButton = new Button(parent, SWT.PUSH);
- xmlCatalogBrowseButton.setText(CXFUIMessages.WSDL2JAVA_XML_CATLOG_BROWSE);
- return xmlCatalogBrowseButton;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFClasspathContainerPage.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFClasspathContainerPage.java
deleted file mode 100644
index 0b2262c..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFClasspathContainerPage.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Shane Clarke.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Shane Clarke - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.wizards;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
-import org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFInstall;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-public class CXFClasspathContainerPage extends WizardPage implements IClasspathContainerPage, IClasspathContainerPageExtension {
-
- private IProject project;
- private ComboViewer installationsComboViewer;
- private Link link;
- private CXFContext context;
- private CXFInstall defaultInstall;
- private String intalledVersion;
-
- public CXFClasspathContainerPage() {
- super("cxf.classpath.container.page");
- setTitle(CXFUIMessages.CXF_INSTALL_WIZARD_PAGE_TITLE);
- setDescription(CXFUIMessages.CXF_INSTALL_WIZARD_PAGE_DESCRIPTION);
- setImageDescriptor(CXFUIPlugin.imageDescriptorFromPlugin(CXFUIPlugin.PLUGIN_ID, "icons/wizban/library_wiz.png"));
- context = CXFCorePlugin.getDefault().getJava2WSContext();
- }
-
- public boolean finish() {
- return true;
- }
-
- public IClasspathEntry getSelection() {
- CXFInstall selectedInstall = getSelectedInstall();
- if (selectedInstall != null) {// && !selectedInstall.getVersion().equals(intalledVersion)) {
- CXFCorePlugin.getDefault().setCXFRuntimeVersion(project, selectedInstall.getVersion());
-
- IClasspathAttribute jstComponentDependency =
- JavaCore.newClasspathAttribute("org.eclipse.jst.component.dependency", "/WEB-INF/lib"); //$NON-NLS-1$
- IPath path = new Path(CXFCorePlugin.CXF_CLASSPATH_CONTAINER_ID);
- path = path.append(selectedInstall.getType());
- path = path.append(selectedInstall.getVersion());
- return JavaCore.newContainerEntry(path, new IAccessRule[0],
- CXFCorePlugin.getDefault().getJava2WSContext().isExportCXFClasspathContainer()
- ? new IClasspathAttribute[]{jstComponentDependency} : new IClasspathAttribute[]{},
- true);
- }
- return null;
- }
-
- public void setSelection(IClasspathEntry containerEntry) {
- if (project != null) {
- intalledVersion = CXFCorePlugin.getDefault().getCXFRuntimeVersion(project);
- defaultInstall = context.getInstallations().get(intalledVersion);
- if (defaultInstall != null && installationsComboViewer != null) {
- installationsComboViewer.setSelection(new StructuredSelection(defaultInstall), true);
- }
- }
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
-
- GridLayout gridLayout = new GridLayout(2, false);
- composite.setLayout(gridLayout);
-
- link = new Link(composite, SWT.NONE);
- link.setText(CXFUIMessages.CXF_CONFIGURE_INSTALLED_RUNTIMES_LABEL);
- link.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- int selectedIndex = installationsComboViewer.getCombo().getSelectionIndex();
- int result = PreferencesUtil.createPreferenceDialogOn(getShell(),
- "org.eclipse.jst.ws.cxf.ui.CXFRuntimePreferencesPage", //$NON-NLS-1$
- new String[] {"org.eclipse.jst.ws.cxf.ui.CXFRuntimePreferencesPage"}, null).open(); //$NON-NLS-1$
- if (result == Window.OK) {
- installationsComboViewer.refresh();
- installationsComboViewer.getCombo().select(selectedIndex);
- }
- }
- });
-
- GridData gridData = new GridData(SWT.END, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- link.setLayoutData(gridData);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(CXFUIMessages.CXF_PROPERTY_PAGE_RUNTIME_LABEL);
-
- installationsComboViewer = new ComboViewer(composite, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- installationsComboViewer.getCombo().setLayoutData(gridData);
-
- installationsComboViewer.setContentProvider(new IStructuredContentProvider() {
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof Collection<?>) {
- return ((Collection<?>) inputElement).toArray();
- }
- return new Object[] {};
- }
- });
-
- installationsComboViewer.setLabelProvider(new LabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof CXFInstall) {
- CXFInstall cxfInstall = (CXFInstall) element;
- return cxfInstall.getType() + " " + cxfInstall.getVersion();
- }
- return ""; //$NON-NLS-1$
- }
- });
-
- Collection<CXFInstall> installations = context.getInstallations().values();
-
- installationsComboViewer.setInput(installations);
-
- Dialog.applyDialogFont(composite);
- setControl(composite);
- setSelection(null);
- }
-
- public void initialize(IJavaProject javaProject, IClasspathEntry[] currentEntries) {
- if (javaProject != null) {
- this.project = javaProject.getProject();
- }
- }
-
- private CXFInstall getSelectedInstall() {
- StructuredSelection structuredSelection = (StructuredSelection) installationsComboViewer.getSelection();
- if (!structuredSelection.isEmpty()) {
- CXFInstall selectedInstall = (CXFInstall) structuredSelection.getFirstElement();
- return selectedInstall;
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFFacetInstallWizardPage.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFFacetInstallWizardPage.java
deleted file mode 100644
index bc5f1dd..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFFacetInstallWizardPage.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Shane Clarke.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Shane Clarke - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.wizards;
-
-import java.util.Collection;
-
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFDataModel;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFInstall;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
-
-public class CXFFacetInstallWizardPage extends AbstractFacetWizardPage {
-
- private CXFDataModel dataModel;
- private CXFContext cxfContext;
-
- private ComboViewer installationsComboViewer;
-
- public CXFFacetInstallWizardPage() {
- super("cxf.core.facet.install.page"); //$NON-NLS-1$
- setTitle(CXFUIMessages.CXF_FACET_INSTALL_WIZARD_PAGE_TITLE);
- setDescription(CXFUIMessages.CXF_FACET_INSTALL_WIZARD_PAGE_DESCRIPTION);
- cxfContext = CXFCorePlugin.getDefault().getJava2WSContext();
- }
-
- public void setConfig(Object config) {
- dataModel = (CXFDataModel) config;
- }
-
- @Override
- public void transferStateToConfig() {
- StructuredSelection structuredSelection = (StructuredSelection) installationsComboViewer.getSelection();
- CXFInstall selectedInstall = (CXFInstall) structuredSelection.getFirstElement();
- if (selectedInstall != null) {
- dataModel.setDefaultRuntimeVersion(selectedInstall.getVersion());
- dataModel.setDefaultRuntimeLocation(selectedInstall.getLocation());
- dataModel.setDefaultRuntimeType(selectedInstall.getType());
- }
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
-
- GridLayout gridLayout = new GridLayout(2, false);
- composite.setLayout(gridLayout);
-
- Link link = new Link(composite, SWT.RIGHT);
- link.setText(CXFUIMessages.CXF_CONFIGURE_INSTALLED_RUNTIMES_LABEL);
- link.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- int selectedIndex = installationsComboViewer.getCombo().getSelectionIndex();
- int result = PreferencesUtil.createPreferenceDialogOn(getShell(),
- "org.eclipse.jst.ws.cxf.ui.CXFRuntimePreferencesPage", //$NON-NLS-1$
- new String[] { "org.eclipse.jst.ws.cxf.ui.CXFRuntimePreferencesPage" }, null).open(); //$NON-NLS-1$
- if (result == Window.OK) {
- installationsComboViewer.refresh();
- setDefault();
- }
- }
- });
-
- GridData gridData = new GridData(SWT.END, SWT.FILL, true, false);
- gridData.horizontalSpan = 2;
- link.setLayoutData(gridData);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(CXFUIMessages.CXF_PROPERTY_PAGE_RUNTIME_LABEL);
-
- installationsComboViewer = new ComboViewer(composite, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- installationsComboViewer.getCombo().setLayoutData(gridData);
-
- installationsComboViewer.setContentProvider(new IStructuredContentProvider() {
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof Collection<?>) {
- return ((Collection<?>) inputElement).toArray();
- }
- return new Object[] {};
- }
- });
-
- installationsComboViewer.setLabelProvider(new LabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof CXFInstall) {
- CXFInstall cxfInstall = (CXFInstall) element;
- return cxfInstall.getType() + " " + cxfInstall.getVersion();
- }
- return "";
- }
-
- });
-
- Collection<CXFInstall> installations = cxfContext.getInstallations().values();
- installationsComboViewer.setInput(installations);
- setDefault();
- setControl(composite);
- }
-
- private void setDefault() {
- String intalledVersion = CXFCorePlugin.getDefault().getJava2WSContext().getDefaultRuntimeVersion();
- CXFInstall defaultInstall = cxfContext.getInstallations().get(intalledVersion);
- if (defaultInstall != null) {
- installationsComboViewer.setSelection(new StructuredSelection(defaultInstall), true);
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizard.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizard.java
deleted file mode 100644
index 9541416..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizard.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Shane Clarke.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Shane Clarke - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFInstall;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-
-public class CXFInstallWizard extends Wizard {
-
- private CXFInstallWizardPage cxfInstallWizardPage;
- private CXFInstall cxfInstall;
-
- public CXFInstallWizard() {
- setWindowTitle(CXFUIMessages.CXF_INSTALL_WIZARD_ADD_WINDOW_TITLE);
- }
-
- public CXFInstallWizard(CXFInstall cxfInstall) {
- this.cxfInstall = cxfInstall;
- setWindowTitle(CXFUIMessages.CXF_INSTALL_WIZARD_EDIT_WINDOW_TITLE);
- }
-
- @Override
- public void addPages() {
- if (cxfInstallWizardPage == null) {
- cxfInstallWizardPage = new CXFInstallWizardPage();
- if (cxfInstall != null) {
- cxfInstallWizardPage.setCXFInstall(cxfInstall);
- }
- }
- addPage(cxfInstallWizardPage);
- }
-
- @Override
- public boolean performFinish() {
- return cxfInstallWizardPage.finish();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizardPage.java b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizardPage.java
deleted file mode 100644
index 3c78ddd..0000000
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/wizards/CXFInstallWizardPage.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Shane Clarke.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Shane Clarke - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.cxf.ui.wizards;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.ClasspathContainerInitializer;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jst.ws.internal.cxf.core.CXFClasspathContainer;
-import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
-import org.eclipse.jst.ws.internal.cxf.core.context.CXFPersistentContext;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFFactory;
-import org.eclipse.jst.ws.internal.cxf.core.model.CXFInstall;
-import org.eclipse.jst.ws.internal.cxf.core.utils.LaunchUtils;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIMessages;
-import org.eclipse.jst.ws.internal.cxf.ui.CXFUIPlugin;
-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.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.osgi.framework.Version;
-
-public class CXFInstallWizardPage extends WizardPage {
- private IStatus CXF_LOCATION_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, null);
- private IStatus CXF_TYPE_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, null);
- private IStatus CXF_VERSION_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, null);
- private IStatus OK_STATUS = new Status(IStatus.OK, CXFUIPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
-
- private Pattern digitPattern = Pattern.compile("\\d"); //$NON-NLS-1$
-
- private Button browseButton;
- private Text cxfHomeDirText;
- private Text cxfTypeText;
- private Text cxfVersionText;
-
- String cxfRuntimeVersion = ""; //$NON-NLS-1$
- String cxfRuntimeLocation = ""; //$NON-NLS-1$
- String cxfRuntimeType = ""; //$NON-NLS-1$
-
- private CXFInstall cxfInstall;
-
- protected CXFInstallWizardPage() {
- super("cxf.intall.wizard.page"); //$NON-NLS-1$
- setTitle(CXFUIMessages.CXF_INSTALL_WIZARD_PAGE_TITLE);
- setDescription(CXFUIMessages.CXF_INSTALL_WIZARD_PAGE_DESCRIPTION);
- setImageDescriptor(CXFUIPlugin.imageDescriptorFromPlugin(CXFUIPlugin.PLUGIN_ID, "icons/wizban/library_wiz.png"));
- }
-
- public void createControl(Composite parent) {
- final Composite composite = new Composite(parent, SWT.NONE);
-
- GridLayout gridLayout = new GridLayout(3, false);
- composite.setLayout(gridLayout);
- GridData gridData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gridData);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_CXF_HOME_DIR_LABEL);
-
- cxfHomeDirText = new Text(composite, SWT.BORDER);
-
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- cxfHomeDirText.setLayoutData(gridData);
-
- cxfHomeDirText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateLocationStatus();
- }
- });
-
- browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_BROWSE_BUTTON_LABEL);
-
- browseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog fileDialog = new DirectoryDialog(composite.getShell());
- String fileName = fileDialog.open();
- if (fileName != null) {
- cxfHomeDirText.setText(fileName);
- }
- }
- });
-
- //CXF Version
- Label cxfVersionLabel = new Label(composite, SWT.NONE);
- cxfVersionLabel.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_CXF_VERSION_LABEL);
-
- cxfVersionText = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- cxfVersionText.setLayoutData(gridData);
- cxfVersionText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateVersionStatus();
- }
- });
-
- //Blank label
- new Label(composite, SWT.NONE);
-
- //CXF Type
- Label cxfTypeLabel = new Label(composite, SWT.NONE);
- cxfTypeLabel.setText(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_CXF_TYPE_LABEL);
-
- cxfTypeText = new Text(composite, SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- cxfTypeText.setLayoutData(gridData);
- cxfTypeText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateTypeStatus();
- }
- });
-
- if (cxfInstall != null) {
- cxfHomeDirText.setText(cxfInstall.getLocation());
- cxfVersionText.setText(cxfInstall.getVersion());
- cxfTypeText.setText(cxfInstall.getType());
- }
-
- setControl(composite);
- Dialog.applyDialogFont(composite);
- }
-
- public void setCXFInstall(CXFInstall cxfInstall) {
- this.cxfInstall = cxfInstall;
- }
-
- private void updateLocationStatus() {
- CXF_LOCATION_STATUS = checkRuntimeExist(cxfHomeDirText.getText());
- applyStatusToPage(findMostSevere());
- }
-
- private void updateTypeStatus() {
- CXF_TYPE_STATUS = validateTypeName(cxfTypeText.getText());
- applyStatusToPage(findMostSevere());
- }
-
- private void updateVersionStatus() {
- CXF_VERSION_STATUS = validateVersion(cxfVersionText.getText());
- applyStatusToPage(findMostSevere());
- }
-
- private void applyStatusToPage(IStatus status) {
- String message = status.getMessage();
- if (status.getSeverity() > IStatus.OK) {
- setErrorMessage(message);
- setPageComplete(false);
-
- } else {
- setMessage(getDescription());
- setErrorMessage(null);
- setPageComplete(true);
- }
- }
-
- private IStatus findMostSevere() {
- if (CXF_TYPE_STATUS.getSeverity() > CXF_LOCATION_STATUS.getSeverity()) {
- return CXF_TYPE_STATUS;
- }
- if (CXF_VERSION_STATUS.getSeverity() > CXF_LOCATION_STATUS.getSeverity()) {
- return CXF_VERSION_STATUS;
- }
- if (CXF_TYPE_STATUS.getSeverity() == CXF_LOCATION_STATUS.getSeverity()) {
- return CXF_LOCATION_STATUS;
- }
- if (CXF_VERSION_STATUS.getSeverity() == CXF_LOCATION_STATUS.getSeverity()) {
- return CXF_LOCATION_STATUS;
- }
-
- return CXF_LOCATION_STATUS;
- }
-
- private IStatus checkRuntimeExist(String path) {
- File cxfHomeDir = new File(path);
- if (cxfHomeDirText.getText().trim().equals("")) { //$NON-NLS-1$
- CXF_LOCATION_STATUS = new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID,
- CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_NOT_SET);
- }
- String cxfLibPath = cxfHomeDir + System.getProperty("file.separator") + "lib"; //$NON-NLS-1$ //$NON-NLS-2$
- if (cxfHomeDir.isDirectory()) {
- File cxfLibFolder = new File(cxfLibPath);
- if (cxfLibFolder.isDirectory()) {
- String[] cxfJarFiles = getCXFJarFiles(cxfLibFolder);
- if (cxfJarFiles != null && cxfJarFiles.length > 0) {
- IStatus toolVersionStatus = getToolVersion(cxfLibPath);
- processToolVersion(toolVersionStatus);
- return CXF_LOCATION_STATUS = OK_STATUS;
- }
- }
- }
- cxfTypeText.setText("");
- cxfVersionText.setText("");
- CXF_LOCATION_STATUS = new Status(Status.ERROR, CXFUIPlugin.PLUGIN_ID,
- CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_RUNTIME_NOT_SET);
- return CXF_LOCATION_STATUS;
- }
-
- private IStatus validateTypeName(String typeName) {
- if (typeName.trim().length() == 0) {
- CXF_TYPE_STATUS = new Status(Status.ERROR, CXFUIPlugin.PLUGIN_ID, CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_ENTER_TYPE_NAME);
- } else {
- CXF_TYPE_STATUS = OK_STATUS;
- }
- if (!typeName.matches("[a-zA-Z0-9_\\-\\s]+")) {
- CXF_TYPE_STATUS = new Status(Status.ERROR, CXFUIPlugin.PLUGIN_ID,
- CXFUIMessages.bind(CXFUIMessages.CXF_RUNTIME_PREFERENCE_PAGE_INVALID_TYPE_NAME, typeName));
- } else {
- CXF_TYPE_STATUS = OK_STATUS;
- }
- return CXF_TYPE_STATUS;
- }
-
- private IStatus validateVersion(String version) {
- if (CXFCorePlugin.getDefault().getJava2WSContext().getInstallations().containsKey(version)
- && cxfInstall != null && !cxfInstall.getVersion().equals(version)) {
- CXF_VERSION_STATUS = new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID, "Version already installed");
- } else {
- CXF_VERSION_STATUS = OK_STATUS;
- }
- return CXF_VERSION_STATUS;
- }
-
- private String[] getCXFJarFiles(File directory) {
- String[] cxfJarFiles = directory.list(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- if (name.startsWith("cxf") && name.endsWith(".jar") //$NON-NLS-1$ //$NON-NLS-2$
- && digitPattern.matcher(name).find()) {
- return true;
- }
- return false;
- }
- });
- return cxfJarFiles;
- }
-
- private IStatus getToolVersion(String cxLibFolderPath) {
- File cxfLibFolder = new File(cxLibFolderPath);
- List<String> cxfLib = new ArrayList<String>();
- String[] jarFiles = cxfLibFolder.list(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- if (name.endsWith(".jar")) { //$NON-NLS-1$
- return true;
- }
- return false;
- }
- });
-
- for (String jarFile : jarFiles) {
- cxfLib.add(cxLibFolderPath + System.getProperty("file.separator") + jarFile); //$NON-NLS-1$
- }
-
- IStatus toolVersionStatus = LaunchUtils.launch(cxfLib.toArray(new String[cxfLib.size()]),
- "org.apache.cxf.tools.wsdlto.WSDLToJava", new String[] { "-v" }); //$NON-NLS-1$ //$NON-NLS-2$
- return toolVersionStatus;
- }
-
- private void processToolVersion(IStatus toolVersionStatus) {
- if (toolVersionStatus.getSeverity() == IStatus.INFO) {
- String cxfToolVersion = toolVersionStatus.getMessage();
-
- cxfToolVersion = cxfToolVersion.substring(cxfToolVersion.indexOf("-") + 1, //$NON-NLS-1$
- cxfToolVersion.length()).trim();
-
- Matcher matcher = digitPattern.matcher(cxfToolVersion);
- if (matcher.find()) {
- int start = matcher.start();
- int end = matcher.end();
- while (matcher.find()) {
- end = matcher.end();
- }
- cxfRuntimeType = cxfToolVersion.substring(0, start).trim();
- cxfRuntimeVersion = cxfToolVersion.substring(start, end);
- }
-
- cxfVersionText.setText(cxfRuntimeVersion);
- cxfTypeText.setText(cxfRuntimeType);
- CXFCorePlugin.getDefault().setCurrentRuntimeVersion(new Version(cxfRuntimeVersion));
- }
- }
-
- public boolean finish() {
- CXFPersistentContext context = CXFCorePlugin.getDefault().getJava2WSContext();
- Map<String, CXFInstall> installs = context.getInstallations();
- CXFInstall install = CXFFactory.eINSTANCE.createCXFInstall();
- install.setVersion(cxfVersionText.getText().trim());
- install.setLocation(cxfHomeDirText.getText().trim());
- install.setType(cxfTypeText.getText().trim());
- installs.put(cxfRuntimeVersion, install);
- context.setInstallations(installs);
- if (isUpdateRequired(install)) {
- updateProjects(install);
- }
- return true;
- }
-
- public boolean isUpdateRequired(CXFInstall install) {
- if (cxfInstall == null) {
- return false;
- }
- if (!cxfInstall.getLocation().equals(install.getLocation())
- || !cxfInstall.getType().equals(install.getType())) {
- return true;
- }
- return false;
- }
-
- public void updateProjects(CXFInstall install) {
- try {
- Set<IFacetedProject> cxfProjects = ProjectFacetsManager.getFacetedProjects(ProjectFacetsManager.getProjectFacet("cxf.core"));
- Iterator<IFacetedProject> projIter = cxfProjects.iterator();
- while (projIter.hasNext()) {
- IFacetedProject cxfProject = projIter.next();
- String installedVersion = CXFCorePlugin.getDefault().getCXFRuntimeVersion(cxfProject.getProject());
- if (installedVersion.equals(install.getVersion())) {
- ClasspathContainerInitializer classpathContainerInitializer = JavaCore.getClasspathContainerInitializer(
- CXFCorePlugin.CXF_CLASSPATH_CONTAINER_ID);
- if (classpathContainerInitializer != null) {
- IPath containerPath = new Path(CXFCorePlugin.CXF_CLASSPATH_CONTAINER_ID);
- IJavaProject javaProject = JavaCore.create(cxfProject.getProject());
- CXFClasspathContainer cxfClasspathContainer = new CXFClasspathContainer(containerPath, javaProject);
- classpathContainerInitializer.requestClasspathContainerUpdate(containerPath, javaProject,
- cxfClasspathContainer);
- }
- }
- }
- } catch (CoreException ce) {
- CXFUIPlugin.log(ce.getStatus());
- }
- }
-} \ No newline at end of file

Back to the top