diff options
Diffstat (limited to 'bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton')
3 files changed, 0 insertions, 420 deletions
diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java deleted file mode 100644 index 47cb1e1e5..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2006 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.consumption.common.WSDLParserFactory; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - - -public class AxisSkeletonDefaultingCommand extends AbstractDataModelOperation -{ - private IStructuredSelection initialSelection; - private WebServicesParser webServicesParser; - private String wsdlURI_; - private JavaWSDLParameter javaWSDLParam; - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - javaWSDLParam = new JavaWSDLParameter(); - javaWSDLParam.setServerSide(JavaWSDLParameter.SERVER_SIDE_BEAN); - javaWSDLParam.setSkeletonDeploy(true); - javaWSDLParam.setMetaInfOnly(false); - javaWSDLParam.setInputWsdlLocation(wsdlURI_); - return Status.OK_STATUS; - - } - - public void setInitialSelection(IStructuredSelection initialSelection) - { - this.initialSelection = initialSelection; - } - - public void setObjectSelection(IStructuredSelection objectSelection) - { - } - - public void setWebServicesParser(WebServicesParser webServicesParser) - { - this.webServicesParser = webServicesParser; - } - - public WebServicesParser getWebServicesParser() - { - if (webServicesParser == null) - webServicesParser = WSDLParserFactory.getWSDLParser(); - return webServicesParser; - } - - public String getWebServiceURI() - { - if (initialSelection != null && !initialSelection.isEmpty()) - { - Object firstElement = initialSelection.getFirstElement(); - if (firstElement instanceof IFile) - { - IFile ifile = (IFile)firstElement; - String fileExtension = ifile.getFileExtension(); - if (fileExtension.equals("wsdl") || - fileExtension.equals("wsil") || - fileExtension.equals("html")) - { - return ifile.getFullPath().toString(); - } - } - } - return ""; - } - - public String getWsdlURI() - { - return wsdlURI_; - } - - public void setWsdlURI(String wsdlURI) - { - wsdlURI_ = wsdlURI; - - } - - public boolean getGenWSIL() - { - return false; - } - - public String getWsilURI() - { - String wsURI = getWsdlURI(); - int index = wsURI.lastIndexOf('.'); - if (index != -1) - { - StringBuffer sb = new StringBuffer(wsURI.substring(0, index)); - sb.append(".wsil"); - return sb.toString(); - } - return ""; - } - - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam; - } - - public String getHttpBasicAuthPassword() - { - return getWebServicesParser().getHTTPBasicAuthPassword(); - } - - public String getHttpBasicAuthUsername() - { - return getWebServicesParser().getHTTPBasicAuthUsername(); - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidget.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidget.java deleted file mode 100644 index 2960305e8..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidget.java +++ /dev/null @@ -1,174 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2006 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - * yyyymmdd bug Email and other contact information - * -------- -------- ----------------------------------------------------------- - * 20060106 121199 jesper@selskabet.org - Jesper Møller - * 20060321 128827 joan - Joan Haggarty, remove redundant wsdl URI, folder and file controls - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; -import org.eclipse.jst.ws.internal.ui.common.UIUtils; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.ui.PlatformUI; -import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents; - - -public class SkeletonConfigWidget extends SimpleWidgetDataContributor -{ - private JavaWSDLParameter javaWSDLParam; - - /* CONTEXT_ID PBSC0001 for the Skeleton Config Page */ - private static final String INFOPOP_PBSC_PAGE = "PBSC0001"; //$NON-NLS-1$ - - // private Text uriText_; - /* CONTEXT_ID PBCF0002 for the URI field of the Bean Config Page */ - //private final String INFOPOP_PBCF_TEXT_URI = "PBCF0002"; //$NON-NLS-1$ - - private Combo skeletonFolderText_; - /* CONTEXT_ID PBSC0004 for the Skeleton Folder field of the Skeleton Config Page */ - private static final String INFOPOP_PBSC_TEXT_SKELETON_FOLDER = "PBSC0004"; //$NON-NLS-1$ - - - /* CONTEXT_ID PBSC0005 for the Skeleton Folder Browse button of the Skeleton Config Page */ - // private static final String INFOPOP_PBSC_BUTTON_SKELETON_FOLDER_BROWSE = "PBSC0005"; //$NON-NLS-1$ - // private static final String TOOLTIP_PBSC_BUTTON_SKELETON_FOLDER_BROWSE = "TOOLTIP_PBSC_BUTTON_SKELETON_FOLDER_BROWSE"; - - private Button showMappingsCheckbox_; - /* CONTEXT_ID PBSC0016 for the Show Mappings checkbox of the Bean Methods Page */ - private String INFOPOP_N2P_SHOW_MAPPINGS = "PBSC0016"; //$NON-NLS-1$ - - private IProject serverProject_; - - public WidgetDataEvents addControls( Composite parent, Listener statusListener) - { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - - UIUtils uiUtils = new UIUtils( pluginId ); - UIUtils conUiUtils = new UIUtils( pluginId ); - UIUtils baseConUiUtils = new UIUtils( pluginId ); - - PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, pluginId + "." + INFOPOP_PBSC_PAGE ); - parent.setToolTipText( AxisCreationUIMessages.TOOLTIP_PBSC_PAGE ); - - Composite textGroup = uiUtils.createComposite( parent, 2, 0, 0 ); - - /* - uriText_ = uiUtils.createText( textGroup, "LABEL_URI", - TOOLTIP_PBCF_TEXT_URI, - INFOPOP_PBCF_TEXT_URI, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - */ - - skeletonFolderText_ = baseConUiUtils.createCombo( textGroup, ConsumptionUIMessages.LABEL_SKELETON_ROOT_NAME, - ConsumptionUIMessages.TOOLTIP_PBSC_TEXT_SKELETON_FOLDER, - INFOPOP_PBSC_TEXT_SKELETON_FOLDER, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - - showMappingsCheckbox_ = conUiUtils.createCheckbox( parent, AxisConsumptionUIMessages.LABEL_EXPLORE_MAPPINGS_XML2BEAN, - AxisConsumptionUIMessages.TOOLTIP_N2P_SHOW_MAPPINGS, - INFOPOP_N2P_SHOW_MAPPINGS ); - - return this; - } - - public void setEndpointURI(String endpointURI) - { - /* - if (endpointURI != null) - uriText_.setText(endpointURI); - */ - } - - public void setOutputJavaFolder(String outputJavaFolder) - { - if (outputJavaFolder != null) - { - int index = skeletonFolderText_.indexOf(outputJavaFolder); - if (index != -1) - skeletonFolderText_.select(index); - else if (skeletonFolderText_.getItemCount() <= 0) - { - String root = getWorkspaceRootLocation(); - if (outputJavaFolder.startsWith(root)) - skeletonFolderText_.setText(outputJavaFolder.substring(root.length())); - else - skeletonFolderText_.setText(outputJavaFolder); - } - } - } - - public void setShowMapping(boolean showMapping) - { - showMappingsCheckbox_.setSelection(showMapping); - } - - public boolean getShowMapping() - { - return showMappingsCheckbox_.getSelection(); - } - - /** - * @return Returns the javaWSDLParam. - */ - public JavaWSDLParameter getJavaWSDLParam() { - -// Do not base Java output directory on workspace root since the project could be not -// physically located in the workspace root, get the project specific root instead - - String projectSpecificRoot = serverProject_.getLocation().toString(); - String skeletonFolder = skeletonFolderText_.getText(); - String projectPathString = serverProject_.getFullPath().toString(); - if (skeletonFolder.startsWith(projectPathString)) { - skeletonFolder = skeletonFolder.substring(projectPathString.length()); - } - javaWSDLParam.setJavaOutput(projectSpecificRoot + skeletonFolder); - return javaWSDLParam; - } - - /** - * @param javaWSDLParam The javaWSDLParam to set. - */ - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) { - this.javaWSDLParam = javaWSDLParam; - } - - public void setServerProject(IProject serviceProject) - { - serverProject_ = serviceProject; - String originalSkeletonFolder = skeletonFolderText_.getText(); - skeletonFolderText_.removeAll(); - IPath[] paths = ResourceUtils.getAllJavaSourceLocations(serviceProject); - for (int i = 0; i < paths.length ; i++) - skeletonFolderText_.add(paths[i].toString()); - int index = skeletonFolderText_.indexOf(originalSkeletonFolder); - if (index != -1) - skeletonFolderText_.select(index); - else - skeletonFolderText_.select(0); - } - - private String getWorkspaceRootLocation() - { - return ResourcesPlugin.getWorkspace().getRoot().getLocation().removeTrailingSeparator().toString(); - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java deleted file mode 100644 index 03be88a93..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2006 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - * yyyymmdd bug Email and other contact information - * -------- -------- ----------------------------------------------------------- - * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner - * 20060330 124667 kathy@ca.ibm.com - Kathy Chan - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - -public class SkeletonConfigWidgetDefaultingCommand extends AbstractDataModelOperation -{ - private String wsdlURI; - private IProject serverProject; - private JavaWSDLParameter javaWSDLParam; - private String serviceServerTypeID_; - - public SkeletonConfigWidgetDefaultingCommand( ) - { - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - - String outputDir = ResourceUtils.findResource(J2EEUtils.getWebInfPath( serverProject )).getLocation().toString(); - javaWSDLParam.setOutput( outputDir ); -// Do not base Java output directory on workspace root since the project could be not physically located in the workspace root -// javaWSDLParam.setJavaOutput(getRootURL() + getOutputJavaFolder()); - String javaOutput = ResourceUtils.findResource(getOutputJavaFolder()).getLocation().toString(); - javaWSDLParam.setJavaOutput(javaOutput); - - return Status.OK_STATUS; - - } - - public void setWsdlURI(String wsdlURI) - { - this.wsdlURI = wsdlURI; - } - - public void setServerProject(String serverProject) - { - this.serverProject = ResourcesPlugin.getWorkspace().getRoot().getProject(serverProject); - } - - public String getEndpointURI() - { - return null; - } - - public String getOutputWSDLFolder() - { - IPath wsdlPath = J2EEUtils.getWebContentPath(serverProject ).append("wsdl"); - return wsdlPath.toString(); - } - - public String getOutputWSDLFile() - { - int index = wsdlURI.lastIndexOf('/'); - if (index == -1) - index = wsdlURI.lastIndexOf('\\'); - return wsdlURI.substring(index+1, wsdlURI.length()); - } - - public String getOutputJavaFolder() - { - if (serverProject!=null){ - return ResourceUtils.getJavaSourceLocation(serverProject).toString(); - } - return null; - } - - public boolean getShowMapping() - { - return false; - } - - public boolean isShowMapping() - { - return getShowMapping(); - } - - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) - { - this.javaWSDLParam = javaWSDLParam; - } - - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam; - } - -public String getServiceServerTypeID() { - return serviceServerTypeID_; -} - -public void setServiceServerTypeID(String serviceServerTypeID) { - this.serviceServerTypeID_ = serviceServerTypeID; -} -} |