Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 38817 Details for
Bug 136335
getStatus not called for ObjectSelectionWidgets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
multiple plugin patch - consumption.ui, creation.ui & command.env.ui
136335_getStatus (text/plain), 16.02 KB, created by
Joan Haggarty
on 2006-04-18 13:09:18 EDT
(
hide
)
Description:
multiple plugin patch - consumption.ui, creation.ui & command.env.ui
Filename:
MIME Type:
Creator:
Joan Haggarty
Created:
2006-04-18 13:09:18 EDT
Size:
16.02 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.ws.consumption.ui >Index: src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java,v >retrieving revision 1.12 >diff -u -r1.12 ConsumptionUIMessages.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java 17 Apr 2006 21:10:56 -0000 1.12 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java 18 Apr 2006 16:57:44 -0000 >@@ -16,6 +16,7 @@ > * 20060404 134913 sengpl@ca.ibm.com - Seng Phung-Lu > * 20060411 136134 kathy@ca.ibm.com - Kathy Chan > * 20060417 136390/136159 joan@ca.ibm.com - Joan Haggarty >+ * 20060418 136335 joan@ca.ibm.com - Joan Haggarty > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui; > >@@ -188,6 +189,7 @@ > public static String DIALOG_TITILE_SERVICE_PROJECT_SETTINGS; > public static String DIALOG_TITILE_CLIENT_PROJECT_SETTINGS; > public static String DIALOG_TITILE_SERVICE_IMPL_SELECTION; >+ public static String DIALOG_TITILE_SERVICE_DEF_SELECTION; > public static String TOOLTIP_WSWSCEN_SERVICEPROJECT_LINK; > public static String TOOLTIP_WSWSCEN_CLIENTPROJECT_LINK; > public static String TOOLTIP_WSWSCEN_SCALE_DEVELOP; >Index: src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties,v >retrieving revision 1.16 >diff -u -r1.16 ConsumptionUI.properties >--- src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties 17 Apr 2006 21:10:56 -0000 1.16 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties 18 Apr 2006 16:57:44 -0000 >@@ -17,6 +17,7 @@ > # 20060407 135443 joan@ca.ibm.com - Joan Haggarty > # 20060411 136134 kathy@ca.ibm.com - Kathy Chan > # 20060417 136390 joan@ca.ibm.com - Joan Haggarty >+# 20060418 136335 joan@ca.ibm.com - Joan Haggarty > ############################################################################### > > # >@@ -114,6 +115,7 @@ > TOOLTIP_WSWSCEN_CLIENTPROJECT_LINK=Click on the link to edit client project and EAR settings. > > DIALOG_TITILE_SERVICE_IMPL_SELECTION=Select Service Implementation >+DIALOG_TITILE_SERVICE_DEF_SELECTION=Select Service Definition > DIALOG_TITILE_SERVICE_PROJECT_SETTINGS=Specify Service Project Settings > DIALOG_TITILE_CLIENT_PROJECT_SETTINGS=Specify Client Project Settings > >@@ -415,7 +417,7 @@ > PAGE_DESC_WS_SELECTION=Enter a web service URI. > > PAGE_MSG_LOADING_WEB_SERVICE_URI=Loading Web service URI... >-PAGE_MSG_INVALID_WEB_SERVICE_URI=Invalid Web service URI. Enter an URI to a WSDL, WSIL or HTML document. >+PAGE_MSG_INVALID_WEB_SERVICE_URI=Invalid Web service URI. Enter a URI to a WSDL, WSIL or HTML document. > PAGE_MSG_NO_SUCH_FILE=File "{0}" does not exist. > PAGE_MSG_SELECTION_MUST_BE_WSDL=Selection must be WSDL. > PAGE_MSG_INVALID_WSIL_FILE_NAME=Invalid WSIL file name. WSIL file name must end with .wsil >@@ -430,7 +432,7 @@ > LABEL_IMPORT=Import... > LABEL_ADD=Add > LABEL_REMOVE=Remove >-LABEL_WS_SELECTION=Enter an URI to a WSDL, WSIL or HTML document: >+LABEL_WS_SELECTION=Enter a URI to a WSDL, WSIL or HTML document: > LABEL_SELECT_WSDL=Select a WSDL > LABEL_VALIDATE_MESSAGES=WSDL validation messages: > >@@ -439,7 +441,7 @@ > TOOLTIP_WSIL_BUTTON_BROWSE_WSIL=Browse for a WSIL document. > TOOLTIP_WSIL_TABLE_WSDL=Enter the URIs of the WSDLs that are going to be added as service references. > TOOLTIP_PCON_PAGE=Select a web service for consumption. >-TOOLTIP_PCON_TEXT_WS=Enter an URI to a WSDL, WSIL or HTML document. >+TOOLTIP_PCON_TEXT_WS=Enter a URI to a WSDL, WSIL or HTML document. > TOOLTIP_PCON_BUTTON_BROWSE_WS=Browse for a web service resource. > TOOLTIP_VALIDATE_TEXT_MESSAGE=Messages from WSDL validation. > TOOLTIP_TABLE_VALIDATE_MESSAGE=Use the Web Service Profile Compliance and Validation preference to enable or disable WSDL validation. >#P org.eclipse.jst.ws.creation.ui >Index: src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java,v >retrieving revision 1.25 >diff -u -r1.25 ServerWizardWidget.java >--- src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java 17 Apr 2006 21:10:42 -0000 1.25 >+++ src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java 18 Apr 2006 16:57:44 -0000 >@@ -16,6 +16,7 @@ > * 20060410 135562 joan@ca.ibm.com - Joan Haggarty > * 20060411 136167 kathy@ca.ibm.com - Kathy Chan > * 20060417 136390/136391/136159 joan@ca.ibm.com - Joan Haggarty >+ * 20060418 136335 joan@ca.ibm.com - Joan Haggarty > *******************************************************************************/ > package org.eclipse.jst.ws.internal.creation.ui.widgets; > >@@ -222,10 +223,11 @@ > GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); > serviceImpl_.setLayoutData( griddata ); > serviceImpl_.setToolTipText(ConsumptionUIMessages.TOOLTIP_WSWSCEN_TEXT_IMPL); >+ serviceImpl_.addListener(SWT.Modify, statusListener); > utils.createInfoPop(serviceImpl_, INFOPOP_WSWSCEN_TEXT_SERVICE_IMPL); > > browseButton_ = utils.createPushButton(typeComposite, >- ConsumptionUIMessages.BUTTON_BROWSE, ConsumptionUIMessages.TOOLTIP_WSWSCEN_BUTTON_BROWSE_IMPL, null); >+ ConsumptionUIMessages.BUTTON_BROWSE, ConsumptionUIMessages.TOOLTIP_WSWSCEN_BUTTON_BROWSE_IMPL, null); > > browseDialog_ = new ServiceImplSelectionDialog(Workbench.getInstance().getActiveWorkbenchWindow().getShell(), > new PageInfo(ConsumptionUIMessages.DIALOG_TITILE_SERVICE_IMPL_SELECTION, "", >@@ -646,12 +648,17 @@ > > // If the webservice has not been selected then user can not move > // forward to the next page. >- >- //TODO: jvh - need to add base object plus minimum service gen to the requirements for the page... >+ > if (webserviceType_.getText().equals("")) { > status = StatusUtils.errorStatus(""); > } > >+ if (serviceImpl_.getText().equals("")) { >+ status = StatusUtils.errorStatus(""); >+ } >+ >+ //jvh - what about project settings/server & runtime settings?? >+ > return status; > } > >@@ -1083,7 +1090,7 @@ > else > { > browseDialog_.setTypeRuntimeServer(getServiceTypeRuntimeServer()); >- browseDialog_.setInitialSelection(getObjectSelection()); >+ browseDialog_.setInitialSelection(getObjectSelection()); > result = browseDialog_.open(); > if (result == Dialog.OK) > { >Index: src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServiceImplSelectionDialog.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServiceImplSelectionDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 ServiceImplSelectionDialog.java >--- src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServiceImplSelectionDialog.java 10 Apr 2006 21:21:53 -0000 1.2 >+++ src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServiceImplSelectionDialog.java 18 Apr 2006 16:57:44 -0000 >@@ -10,18 +10,22 @@ > * yyyymmdd bug Email and other contact information > * -------- -------- ----------------------------------------------------------- > * 20060410 135441 joan@ca.ibm.com - Joan Haggarty >+ * 20060418 136335 joan@ca.ibm.com - Joan Haggarty > *******************************************************************************/ > package org.eclipse.jst.ws.internal.creation.ui.widgets; > > import org.eclipse.core.resources.IProject; > import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; > import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionWidget; >+import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; > import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.wst.command.internal.env.ui.widgets.AbstractSelectionDialog; > import org.eclipse.wst.command.internal.env.ui.widgets.PageInfo; >+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario; > > public class ServiceImplSelectionDialog extends AbstractSelectionDialog { > >@@ -42,7 +46,23 @@ > > public void setTypeRuntimeServer(TypeRuntimeServer trs) > { >- trs_ = trs; >+ trs_ = trs; >+ >+ // set dialog title text based on the web service scenario >+ if (trs != null) >+ { >+ String typeId = trs.getTypeId(); >+ int scenario = WebServiceRuntimeExtensionUtils2.getScenarioFromTypeId(typeId); >+ >+ if (scenario == WebServiceScenario.BOTTOMUP) >+ { >+ titleText_ = ConsumptionUIMessages.DIALOG_TITILE_SERVICE_IMPL_SELECTION; >+ } >+ else if (scenario == WebServiceScenario.TOPDOWN) >+ { >+ titleText_ = ConsumptionUIMessages.DIALOG_TITILE_SERVICE_DEF_SELECTION; >+ } >+ } > } > > protected void setShellStyle(int newShellStyle) >#P org.eclipse.wst.command.env.ui >Index: src/org/eclipse/wst/command/internal/env/ui/widgets/SimpleDialog.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/command/plugins/org.eclipse.wst.command.env.ui/src/org/eclipse/wst/command/internal/env/ui/widgets/SimpleDialog.java,v >retrieving revision 1.1 >diff -u -r1.1 SimpleDialog.java >--- src/org/eclipse/wst/command/internal/env/ui/widgets/SimpleDialog.java 5 Apr 2006 15:28:50 -0000 1.1 >+++ src/org/eclipse/wst/command/internal/env/ui/widgets/SimpleDialog.java 18 Apr 2006 16:57:44 -0000 >@@ -1,21 +1,30 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20060418 136335 joan@ca.ibm.com - Joan Haggarty > *******************************************************************************/ > package org.eclipse.wst.command.internal.env.ui.widgets; > >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.jface.dialogs.Dialog; >+import org.eclipse.jface.dialogs.IDialogConstants; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.widgets.Button; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Event; > import org.eclipse.swt.widgets.Listener; > import org.eclipse.swt.widgets.Shell; >+import org.eclipse.swt.widgets.Text; > > public abstract class SimpleDialog extends Dialog implements DialogDataEvents > { >@@ -23,6 +32,8 @@ > private WidgetDataEvents dataEvents_; > private Listener statusListener_; > protected WizardPageManager pageManager_; >+ private Text messageText_; >+ private boolean ok_; > > public SimpleDialog( Shell shell, PageInfo pageInfo) > { >@@ -35,11 +46,38 @@ > { > Composite control = (Composite) super.createDialogArea(parent); > dataEvents_ = widget_.addControls( control, statusListener_ ); >- callSetters(); >+ >+ //Text area to display validation messages >+ messageText_ = new Text(parent, SWT.WRAP | SWT.MULTI | SWT.READ_ONLY); >+ GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); >+ griddata.horizontalIndent = 10; >+ messageText_.setLayoutData( griddata ); >+ >+ //Remove focus from the message text area so cursor doesn't appear there >+ control.setFocus(); >+ >+ //Call extenders override of the callSetters method to intialize any data in widget >+ callSetters(); > org.eclipse.jface.dialogs.Dialog.applyDialogFont(control); > return control; > } >+ >+ //Override of Dialog.createContents so we can affect button enablement >+ protected Control createContents(Composite parent) { >+ Control c = super.createContents(parent); >+ //enable controls for initial entry to dialog >+ validatePageToStatus(); >+ return c; >+ } > >+ // Enable or disable ok button based on state >+ private void enableOk(boolean state) >+ { >+ Button okButton = getButton(IDialogConstants.OK_ID); >+ if (okButton != null) >+ okButton.setEnabled(state); >+ } >+ > //Implement this method to call all setters on the dialog widget after the controls are created > protected abstract void callSetters(); > >@@ -52,57 +90,60 @@ > { > return widget_; > } >+ >+ // sets message in message area above OK and Cancel buttons >+ private void setMessage(String message) >+ { >+ if (message == null) >+ messageText_.setText(""); >+ else >+ messageText_.setText(message); >+ } > > public void validatePageToStatus() > { >- /*IStatus status = widget_.getStatus(); >- >+ IStatus status = widget_.getStatus(); >+ > if( status != null ) > { >- if( status.getSeverity() == IStatus.ERROR ) >- { >- String message = status.getMessage(); >- >+ String message = status.getMessage(); >+ int severity = status.getSeverity(); >+ >+ // for error condition, disable ok and print message >+ if( severity == IStatus.ERROR ) >+ { > if( message.length() == 0 ) > { >- setErrorMessage( null ); >- setMessage( getDescription() ); >+ setMessage( null); > } > else > { >- setErrorMessage( message ); >+ setMessage(message); > } >- >- // jvh - dialog equivalent ....disable OK? setPageComplete( false ); >+ ok_ = false; > } >- else if (status.getSeverity() == IStatus.WARNING ) >+ // display warning and info messages but still enable OK >+ else if (severity == IStatus.WARNING | severity == IStatus.INFO) > { >- setErrorMessage( null ); >- setMessage(status.getMessage(), IStatus.WARNING ); >- // jvh - dialog equivalent ....enable OK?setPageComplete( true ); >- } >- else if( status.getSeverity() == IStatus.INFO ) >- { >- setErrorMessage( null ); >- setMessage( status.getMessage(), IStatus.INFO ); >- // jvh - dialog equivalent ....enable OK?setPageComplete( true ); >- } >- else >+ setMessage(message); >+ ok_ = true; >+ } >+ // no message to display >+ else > { >- setErrorMessage( null ); >- setMessage( getDescription() ); >- // jvh - dialog equivalent ....enable OK?setPageComplete( true ); >+ setMessage( null); >+ ok_ = true; > } > } >+ // null status case > else > { >- setErrorMessage( null ); >- setMessage( getDescription() ); >- // jvh - dialog equivalent ....enable OK?setPageComplete( true ); >+ setMessage(null); >+ ok_ = true; > } > >- // jvh - dialog equivalent - update dialog buttons? getContainer().updateButtons(); >-*/ } >+ enableOk(ok_); >+ } > > private class StatusListener implements Listener > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136335
:
38817