blob: c59ad6df6984487668e09ecdf53c5d4015bd3556 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/*******************************************************************************
* Copyright (c) 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
* -------- -------- -----------------------------------------------------------
* 20060420 135912 joan@ca.ibm.com - Joan Haggarty
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.ui.widgets;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
public interface IObjectSelectionLaunchable {
/**
* The framework will call this method to set the initial selection
* value that the user has specified.
*
* @param initialSelection the initial selection the user specified.
*/
public void setInitialSelection(IStructuredSelection initialSelection);
/**
* The intent of the Object Selection Widget is that the user has
* the opportunity change/find the object that they want to turn into
* a Web service.
*
* @return returns the an IStructuredSelection object that the user
* want to turn into a Web service. This object may be different than
* the initialSelection passed in by the setInitialSelection method.
*/
public IStructuredSelection getObjectSelection();
/**
* Validates whether the objectSelection parameter is valid for
* this Object selection widget. An error status should be returned
* if this object is not value. Otherwise, and ok status should be
* returned
*
* @param objectSelection the object to be validated.
* @return the status of the validation.
*/
public IStatus validateSelection(IStructuredSelection objectSelection);
/**
*
* @return returns the IProject that contains the selection
* object that the user has chosen with this widget. The value can be
* null if there is no IProject for this object.
*/
public IProject getProject();
/**
*
* @return returns the name of the IVirtualComponent that contains the selection
* object that the user has chosen with this widget. The value can be
* null if there is no IVirtualComponent for this object
*/
public String getComponentName();
/**
* Called to launch a dialog which allows the user to make an object selection.
* This is an alternative to implementing IObjectSelectionWidget which can be used by the dialog framework.
* The implementation of this method should call the necessary getters on the dialog to update the
* object selection.
*
* @return the status of completing the dialog launch
*/
public int launch(Shell shell);
/**
*
* @return returns the string to displayed in the UI for the selected object
*/
public String getObjectSelectionDisplayableString();
/**
*
* @param s A string representation of the object selection
* @return true if the string represents a valid object selection.
* The implementation of this method should set the widget object selection
* according to the input string so that a subsequent call to getObjectSelection
* will retrieve the correct object.
*/
public boolean validate(String s);
}
|