Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 136335
Collapse All | Expand All

(-)src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java (+2 lines)
Lines 16-21 Link Here
16
 * 20060404 134913   sengpl@ca.ibm.com - Seng Phung-Lu 
16
 * 20060404 134913   sengpl@ca.ibm.com - Seng Phung-Lu 
17
 * 20060411   136134 kathy@ca.ibm.com - Kathy Chan
17
 * 20060411   136134 kathy@ca.ibm.com - Kathy Chan
18
 * 20060417   136390/136159 joan@ca.ibm.com - Joan Haggarty
18
 * 20060417   136390/136159 joan@ca.ibm.com - Joan Haggarty
19
 * 20060418   136335 joan@ca.ibm.com - Joan Haggarty
19
 *******************************************************************************/
20
 *******************************************************************************/
20
package org.eclipse.jst.ws.internal.consumption.ui;
21
package org.eclipse.jst.ws.internal.consumption.ui;
21
22
Lines 188-193 Link Here
188
	public static String DIALOG_TITILE_SERVICE_PROJECT_SETTINGS;
189
	public static String DIALOG_TITILE_SERVICE_PROJECT_SETTINGS;
189
	public static String DIALOG_TITILE_CLIENT_PROJECT_SETTINGS;
190
	public static String DIALOG_TITILE_CLIENT_PROJECT_SETTINGS;
190
	public static String DIALOG_TITILE_SERVICE_IMPL_SELECTION;
191
	public static String DIALOG_TITILE_SERVICE_IMPL_SELECTION;
192
	public static String DIALOG_TITILE_SERVICE_DEF_SELECTION;
191
	public static String TOOLTIP_WSWSCEN_SERVICEPROJECT_LINK;
193
	public static String TOOLTIP_WSWSCEN_SERVICEPROJECT_LINK;
192
	public static String TOOLTIP_WSWSCEN_CLIENTPROJECT_LINK;
194
	public static String TOOLTIP_WSWSCEN_CLIENTPROJECT_LINK;
193
	public static String TOOLTIP_WSWSCEN_SCALE_DEVELOP;
195
	public static String TOOLTIP_WSWSCEN_SCALE_DEVELOP;
(-)src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties (-3 / +5 lines)
Lines 17-22 Link Here
17
# 20060407   135443 joan@ca.ibm.com - Joan Haggarty
17
# 20060407   135443 joan@ca.ibm.com - Joan Haggarty
18
# 20060411   136134 kathy@ca.ibm.com - Kathy Chan
18
# 20060411   136134 kathy@ca.ibm.com - Kathy Chan
19
# 20060417   136390 joan@ca.ibm.com - Joan Haggarty
19
# 20060417   136390 joan@ca.ibm.com - Joan Haggarty
20
# 20060418   136335 joan@ca.ibm.com - Joan Haggarty
20
###############################################################################
21
###############################################################################
21
22
22
#
23
#
Lines 114-119 Link Here
114
TOOLTIP_WSWSCEN_CLIENTPROJECT_LINK=Click on the link to edit client project and EAR settings.
115
TOOLTIP_WSWSCEN_CLIENTPROJECT_LINK=Click on the link to edit client project and EAR settings.
115
116
116
DIALOG_TITILE_SERVICE_IMPL_SELECTION=Select Service Implementation
117
DIALOG_TITILE_SERVICE_IMPL_SELECTION=Select Service Implementation
118
DIALOG_TITILE_SERVICE_DEF_SELECTION=Select Service Definition
117
DIALOG_TITILE_SERVICE_PROJECT_SETTINGS=Specify Service Project Settings
119
DIALOG_TITILE_SERVICE_PROJECT_SETTINGS=Specify Service Project Settings
118
DIALOG_TITILE_CLIENT_PROJECT_SETTINGS=Specify Client Project Settings
120
DIALOG_TITILE_CLIENT_PROJECT_SETTINGS=Specify Client Project Settings
119
121
Lines 415-421 Link Here
415
PAGE_DESC_WS_SELECTION=Enter a web service URI.
417
PAGE_DESC_WS_SELECTION=Enter a web service URI.
416
418
417
PAGE_MSG_LOADING_WEB_SERVICE_URI=Loading Web service URI...
419
PAGE_MSG_LOADING_WEB_SERVICE_URI=Loading Web service URI...
418
PAGE_MSG_INVALID_WEB_SERVICE_URI=Invalid Web service URI.  Enter an URI to a WSDL, WSIL or HTML document.
420
PAGE_MSG_INVALID_WEB_SERVICE_URI=Invalid Web service URI.  Enter a URI to a WSDL, WSIL or HTML document.
419
PAGE_MSG_NO_SUCH_FILE=File "{0}" does not exist.
421
PAGE_MSG_NO_SUCH_FILE=File "{0}" does not exist.
420
PAGE_MSG_SELECTION_MUST_BE_WSDL=Selection must be WSDL.
422
PAGE_MSG_SELECTION_MUST_BE_WSDL=Selection must be WSDL.
421
PAGE_MSG_INVALID_WSIL_FILE_NAME=Invalid WSIL file name.  WSIL file name must end with .wsil
423
PAGE_MSG_INVALID_WSIL_FILE_NAME=Invalid WSIL file name.  WSIL file name must end with .wsil
Lines 430-436 Link Here
430
LABEL_IMPORT=Import...
432
LABEL_IMPORT=Import...
431
LABEL_ADD=Add
433
LABEL_ADD=Add
432
LABEL_REMOVE=Remove
434
LABEL_REMOVE=Remove
433
LABEL_WS_SELECTION=Enter an URI to a WSDL, WSIL or HTML document:
435
LABEL_WS_SELECTION=Enter a URI to a WSDL, WSIL or HTML document:
434
LABEL_SELECT_WSDL=Select a WSDL
436
LABEL_SELECT_WSDL=Select a WSDL
435
LABEL_VALIDATE_MESSAGES=WSDL validation messages:
437
LABEL_VALIDATE_MESSAGES=WSDL validation messages:
436
438
Lines 439-445 Link Here
439
TOOLTIP_WSIL_BUTTON_BROWSE_WSIL=Browse for a WSIL document.
441
TOOLTIP_WSIL_BUTTON_BROWSE_WSIL=Browse for a WSIL document.
440
TOOLTIP_WSIL_TABLE_WSDL=Enter the URIs of the WSDLs that are going to be added as service references.
442
TOOLTIP_WSIL_TABLE_WSDL=Enter the URIs of the WSDLs that are going to be added as service references.
441
TOOLTIP_PCON_PAGE=Select a web service for consumption.
443
TOOLTIP_PCON_PAGE=Select a web service for consumption.
442
TOOLTIP_PCON_TEXT_WS=Enter an URI to a WSDL, WSIL or HTML document.
444
TOOLTIP_PCON_TEXT_WS=Enter a URI to a WSDL, WSIL or HTML document.
443
TOOLTIP_PCON_BUTTON_BROWSE_WS=Browse for a web service resource.
445
TOOLTIP_PCON_BUTTON_BROWSE_WS=Browse for a web service resource.
444
TOOLTIP_VALIDATE_TEXT_MESSAGE=Messages from WSDL validation.
446
TOOLTIP_VALIDATE_TEXT_MESSAGE=Messages from WSDL validation.
445
TOOLTIP_TABLE_VALIDATE_MESSAGE=Use the Web Service Profile Compliance and Validation preference to enable or disable WSDL validation.
447
TOOLTIP_TABLE_VALIDATE_MESSAGE=Use the Web Service Profile Compliance and Validation preference to enable or disable WSDL validation.
(-)src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java (-4 / +11 lines)
Lines 16-21 Link Here
16
 * 20060410   135562 joan@ca.ibm.com - Joan Haggarty
16
 * 20060410   135562 joan@ca.ibm.com - Joan Haggarty
17
 * 20060411   136167 kathy@ca.ibm.com - Kathy Chan
17
 * 20060411   136167 kathy@ca.ibm.com - Kathy Chan
18
 * 20060417   136390/136391/136159 joan@ca.ibm.com - Joan Haggarty
18
 * 20060417   136390/136391/136159 joan@ca.ibm.com - Joan Haggarty
19
 * 20060418   136335 joan@ca.ibm.com - Joan Haggarty
19
 *******************************************************************************/
20
 *******************************************************************************/
20
package org.eclipse.jst.ws.internal.creation.ui.widgets;
21
package org.eclipse.jst.ws.internal.creation.ui.widgets;
21
22
Lines 222-231 Link Here
222
			GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);		    
223
			GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);		    
223
			serviceImpl_.setLayoutData( griddata );
224
			serviceImpl_.setLayoutData( griddata );
224
			serviceImpl_.setToolTipText(ConsumptionUIMessages.TOOLTIP_WSWSCEN_TEXT_IMPL);
225
			serviceImpl_.setToolTipText(ConsumptionUIMessages.TOOLTIP_WSWSCEN_TEXT_IMPL);
226
			serviceImpl_.addListener(SWT.Modify, statusListener);
225
			utils.createInfoPop(serviceImpl_, INFOPOP_WSWSCEN_TEXT_SERVICE_IMPL);
227
			utils.createInfoPop(serviceImpl_, INFOPOP_WSWSCEN_TEXT_SERVICE_IMPL);
226
			
228
			
227
			browseButton_ = utils.createPushButton(typeComposite,
229
			browseButton_ = utils.createPushButton(typeComposite,
228
					ConsumptionUIMessages.BUTTON_BROWSE, ConsumptionUIMessages.TOOLTIP_WSWSCEN_BUTTON_BROWSE_IMPL, null);
230
					ConsumptionUIMessages.BUTTON_BROWSE, ConsumptionUIMessages.TOOLTIP_WSWSCEN_BUTTON_BROWSE_IMPL, null);			
229
			
231
			
230
		    browseDialog_ = new ServiceImplSelectionDialog(Workbench.getInstance().getActiveWorkbenchWindow().getShell(), 
232
		    browseDialog_ = new ServiceImplSelectionDialog(Workbench.getInstance().getActiveWorkbenchWindow().getShell(), 
231
				  						new PageInfo(ConsumptionUIMessages.DIALOG_TITILE_SERVICE_IMPL_SELECTION, "", 
233
				  						new PageInfo(ConsumptionUIMessages.DIALOG_TITILE_SERVICE_IMPL_SELECTION, "", 
Lines 646-657 Link Here
646
648
647
		// If the webservice has not been selected then user can not move
649
		// If the webservice has not been selected then user can not move
648
		// forward to the next page.
650
		// forward to the next page.
649
		
651
	
650
		//TODO: jvh - need to add base object plus minimum service gen to the requirements for the page...
651
		if (webserviceType_.getText().equals("")) {
652
		if (webserviceType_.getText().equals("")) {
652
			status = StatusUtils.errorStatus("");
653
			status = StatusUtils.errorStatus("");
653
		}
654
		}
654
655
656
		if (serviceImpl_.getText().equals("")) {
657
			status = StatusUtils.errorStatus("");
658
		}
659
		
660
		//jvh - what about project settings/server & runtime settings?? 
661
		
655
		return status;
662
		return status;
656
	}
663
	}
657
	
664
	
Lines 1083-1089 Link Here
1083
			   else
1090
			   else
1084
			   {
1091
			   {
1085
				   browseDialog_.setTypeRuntimeServer(getServiceTypeRuntimeServer());
1092
				   browseDialog_.setTypeRuntimeServer(getServiceTypeRuntimeServer());
1086
				   browseDialog_.setInitialSelection(getObjectSelection());
1093
				   browseDialog_.setInitialSelection(getObjectSelection());				   
1087
			       result = browseDialog_.open();
1094
			       result = browseDialog_.open();
1088
			       if (result == Dialog.OK)
1095
			       if (result == Dialog.OK)
1089
			       {
1096
			       {
(-)src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServiceImplSelectionDialog.java (-1 / +21 lines)
Lines 10-27 Link Here
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060410   135441 joan@ca.ibm.com - Joan Haggarty
12
 * 20060410   135441 joan@ca.ibm.com - Joan Haggarty
13
 * 20060418   136335 joan@ca.ibm.com - Joan Haggarty
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.jst.ws.internal.creation.ui.widgets;
15
package org.eclipse.jst.ws.internal.creation.ui.widgets;
15
16
16
import org.eclipse.core.resources.IProject;
17
import org.eclipse.core.resources.IProject;
17
import org.eclipse.jface.viewers.IStructuredSelection;
18
import org.eclipse.jface.viewers.IStructuredSelection;
19
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
18
import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionWidget;
20
import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionWidget;
21
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
19
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
22
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
20
import org.eclipse.swt.SWT;
23
import org.eclipse.swt.SWT;
21
import org.eclipse.swt.graphics.Point;
24
import org.eclipse.swt.graphics.Point;
22
import org.eclipse.swt.widgets.Shell;
25
import org.eclipse.swt.widgets.Shell;
23
import org.eclipse.wst.command.internal.env.ui.widgets.AbstractSelectionDialog;
26
import org.eclipse.wst.command.internal.env.ui.widgets.AbstractSelectionDialog;
24
import org.eclipse.wst.command.internal.env.ui.widgets.PageInfo;
27
import org.eclipse.wst.command.internal.env.ui.widgets.PageInfo;
28
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
25
29
26
public class ServiceImplSelectionDialog extends AbstractSelectionDialog {
30
public class ServiceImplSelectionDialog extends AbstractSelectionDialog {
27
31
Lines 42-48 Link Here
42
	
46
	
43
	public void setTypeRuntimeServer(TypeRuntimeServer trs)
47
	public void setTypeRuntimeServer(TypeRuntimeServer trs)
44
	{
48
	{
45
         trs_ = trs;      	   
49
		trs_ = trs; 
50
		
51
		// set dialog title text based on the web service scenario
52
		if (trs != null)
53
		{
54
		   String typeId = trs.getTypeId();
55
		   int scenario = WebServiceRuntimeExtensionUtils2.getScenarioFromTypeId(typeId);
56
		   
57
		   if (scenario == WebServiceScenario.BOTTOMUP)
58
		   {
59
			  titleText_ = ConsumptionUIMessages.DIALOG_TITILE_SERVICE_IMPL_SELECTION;
60
		   }
61
		   else if (scenario == WebServiceScenario.TOPDOWN)
62
		   {
63
			   titleText_ = ConsumptionUIMessages.DIALOG_TITILE_SERVICE_DEF_SELECTION;
64
		   }
65
		}             	   
46
	}
66
	}
47
	 
67
	 
48
	  protected void setShellStyle(int newShellStyle)
68
	  protected void setShellStyle(int newShellStyle)
(-)src/org/eclipse/wst/command/internal/env/ui/widgets/SimpleDialog.java (-35 / +76 lines)
Lines 1-21 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060418   136335 joan@ca.ibm.com - Joan Haggarty
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.wst.command.internal.env.ui.widgets;
14
package org.eclipse.wst.command.internal.env.ui.widgets;
12
15
16
import org.eclipse.core.runtime.IStatus;
13
import org.eclipse.jface.dialogs.Dialog;
17
import org.eclipse.jface.dialogs.Dialog;
18
import org.eclipse.jface.dialogs.IDialogConstants;
19
import org.eclipse.swt.SWT;
20
import org.eclipse.swt.layout.GridData;
21
import org.eclipse.swt.widgets.Button;
14
import org.eclipse.swt.widgets.Composite;
22
import org.eclipse.swt.widgets.Composite;
15
import org.eclipse.swt.widgets.Control;
23
import org.eclipse.swt.widgets.Control;
16
import org.eclipse.swt.widgets.Event;
24
import org.eclipse.swt.widgets.Event;
17
import org.eclipse.swt.widgets.Listener;
25
import org.eclipse.swt.widgets.Listener;
18
import org.eclipse.swt.widgets.Shell;
26
import org.eclipse.swt.widgets.Shell;
27
import org.eclipse.swt.widgets.Text;
19
28
20
public abstract class SimpleDialog extends Dialog implements DialogDataEvents
29
public abstract class SimpleDialog extends Dialog implements DialogDataEvents
21
{
30
{
Lines 23-28 Link Here
23
  private   WidgetDataEvents  dataEvents_;
32
  private   WidgetDataEvents  dataEvents_;
24
  private   Listener          statusListener_;
33
  private   Listener          statusListener_;
25
  protected WizardPageManager pageManager_;  
34
  protected WizardPageManager pageManager_;  
35
  private Text messageText_;
36
  private boolean ok_;
26
  	
37
  	
27
  public SimpleDialog( Shell shell, PageInfo pageInfo)
38
  public SimpleDialog( Shell shell, PageInfo pageInfo)
28
  {
39
  {
Lines 35-45 Link Here
35
  {
46
  {
36
	Composite control = (Composite) super.createDialogArea(parent);
47
	Composite control = (Composite) super.createDialogArea(parent);
37
	dataEvents_ = widget_.addControls( control, statusListener_ );
48
	dataEvents_ = widget_.addControls( control, statusListener_ );
38
	callSetters();   
49
	
50
	//Text area to display validation messages
51
	messageText_ = new Text(parent, SWT.WRAP | SWT.MULTI | SWT.READ_ONLY);
52
    GridData griddata = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
53
    griddata.horizontalIndent = 10;
54
    messageText_.setLayoutData( griddata );
55
    
56
    //Remove focus from the message text area so cursor doesn't appear there
57
    control.setFocus();  
58
    
59
    //Call extenders override of the callSetters method to intialize any data in widget
60
    callSetters();   
39
    org.eclipse.jface.dialogs.Dialog.applyDialogFont(control);
61
    org.eclipse.jface.dialogs.Dialog.applyDialogFont(control);
40
    return control;
62
    return control;
41
  }  
63
  }  
64
  
65
  //Override of Dialog.createContents so we can affect button enablement 
66
  protected Control createContents(Composite parent) {
67
	Control c = super.createContents(parent);
68
	//enable controls for initial entry to dialog
69
	validatePageToStatus();
70
	return c;
71
  }
42
72
73
  // Enable or disable ok button based on state
74
  private void enableOk(boolean state)
75
  {
76
	  Button okButton = getButton(IDialogConstants.OK_ID);
77
	  if (okButton != null)
78
	    okButton.setEnabled(state);
79
  }
80
  
43
  //Implement this method to call all setters on the dialog widget after the controls are created
81
  //Implement this method to call all setters on the dialog widget after the controls are created
44
  protected abstract void callSetters();
82
  protected abstract void callSetters();
45
  
83
  
Lines 52-108 Link Here
52
  {
90
  {
53
	  return widget_;
91
	  return widget_;
54
  }
92
  }
93
  
94
  // sets message in message area above OK and Cancel buttons
95
  private void setMessage(String message)
96
  {  
97
	  if (message == null)
98
		  messageText_.setText("");	      
99
	  else		  
100
	      messageText_.setText(message);  
101
  }
55
  	  
102
  	  
56
  public void validatePageToStatus()
103
  public void validatePageToStatus()
57
  {
104
  {
58
    /*IStatus status  = widget_.getStatus();
105
    IStatus status  = widget_.getStatus();    
59
    
106
        
60
    if( status != null )
107
    if( status != null )
61
    {
108
    {
62
      if( status.getSeverity() == IStatus.ERROR )
109
      String message = status.getMessage();
63
      {
110
      int severity = status.getSeverity();
64
        String message = status.getMessage();
111
      
65
112
      // for error condition, disable ok and print message
113
      if( severity == IStatus.ERROR )
114
      { 
66
        if( message.length() == 0 )
115
        if( message.length() == 0 )
67
        {
116
        {
68
          setErrorMessage( null );
117
          setMessage( null);
69
          setMessage( getDescription() );
70
        }
118
        }
71
        else
119
        else
72
        {
120
        {
73
          setErrorMessage( message );
121
          setMessage(message);
74
        }
122
        }
75
          
123
        ok_ = false;
76
        // jvh - dialog equivalent ....disable OK? setPageComplete( false );
77
      }
124
      }
78
      else if (status.getSeverity() == IStatus.WARNING )
125
      // display warning and info messages but still enable OK
126
      else if (severity == IStatus.WARNING | severity == IStatus.INFO)
79
      {
127
      {
80
        setErrorMessage( null );
128
        setMessage(message);
81
        setMessage(status.getMessage(), IStatus.WARNING );
129
        ok_ = true;        
82
        // jvh - dialog equivalent ....enable OK?setPageComplete( true );
130
      }     
83
      }
131
      // no message to display
84
      else if( status.getSeverity() == IStatus.INFO )
132
      else  
85
      {
86
        setErrorMessage( null );
87
        setMessage( status.getMessage(), IStatus.INFO );
88
        // jvh - dialog equivalent ....enable OK?setPageComplete( true );
89
      }
90
      else
91
      {
133
      {
92
        setErrorMessage( null );
134
        setMessage( null);
93
        setMessage( getDescription() );
135
        ok_ = true;
94
        // jvh - dialog equivalent ....enable OK?setPageComplete( true );
95
      }
136
      }
96
    }
137
    }
138
    // null status case
97
    else
139
    else
98
    {
140
    {
99
      setErrorMessage( null );
141
      setMessage(null);
100
      setMessage( getDescription() );
142
      ok_ = true;
101
      // jvh - dialog equivalent ....enable OK?setPageComplete( true );
102
    }
143
    }
103
    
144
    
104
    // jvh - dialog equivalent - update dialog buttons?  getContainer().updateButtons();
145
    enableOk(ok_);    
105
*/  }
146
  }
106
  
147
  
107
  private class StatusListener implements Listener
148
  private class StatusListener implements Listener
108
  {
149
  {

Return to bug 136335