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 157059 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (+1 lines)
Lines 28-33 Link Here
28
         point="org.eclipse.debug.core.launchConfigurationTypes">
28
         point="org.eclipse.debug.core.launchConfigurationTypes">
29
      <launchConfigurationType
29
      <launchConfigurationType
30
            delegate="org.eclipse.jdt.launching.JavaLaunchDelegate"
30
            delegate="org.eclipse.jdt.launching.JavaLaunchDelegate"
31
            delegateDescription="%localJavaApplicationDelegate.description"
31
            delegateName="%localJavaApplicationDelegate.name"
32
            delegateName="%localJavaApplicationDelegate.name"
32
            id="org.eclipse.jdt.launching.localJavaApplication"
33
            id="org.eclipse.jdt.launching.localJavaApplication"
33
            migrationDelegate="org.eclipse.jdt.internal.launching.JavaMigrationDelegate"
34
            migrationDelegate="org.eclipse.jdt.internal.launching.JavaMigrationDelegate"
(-)plugin.properties (+3 lines)
Lines 11-19 Link Here
11
11
12
localJavaApplication = Java Application
12
localJavaApplication = Java Application
13
localJavaApplicationDelegate.name=Eclipse JDT Java Application Tooling
13
localJavaApplicationDelegate.name=Eclipse JDT Java Application Tooling
14
localJavaApplicationDelegate.description=The Eclipse JDT Java Application Tooling provides the capability to run and debug local Java applications.
14
pluginName = Java Development Tools Launching Support
15
pluginName = Java Development Tools Launching Support
15
remoteJavaApplication = Remote Java Application
16
remoteJavaApplication = Remote Java Application
16
remoteJavaApplicationDelegate.name=Eclipse JDT Java Remote Tooling
17
remoteJavaApplicationDelegate.name=Eclipse JDT Java Remote Tooling
18
remoteJavaApplicationDelegate.description=The Eclipse JDT Java Remote Tooling provides the capability to debug remotely running Java applications.
17
vmConnectors = VM Connectors
19
vmConnectors = VM Connectors
18
vmInstallTypes = VM Install Types
20
vmInstallTypes = VM Install Types
19
vmInstalls = VM Installs
21
vmInstalls = VM Installs
Lines 28-33 Link Here
28
providerName=Eclipse.org
30
providerName=Eclipse.org
29
appletLabel= Java Applet
31
appletLabel= Java Applet
30
javaAppletDelegate.name=Eclipse JDT Java Applet Tooling
32
javaAppletDelegate.name=Eclipse JDT Java Applet Tooling
33
javaAppletDelegate.description=The Eclipse JDT Java Applet Tooling provides the capability to run or debug Java applets.
31
34
32
javaSourceLookupDirector.name= Java Source Locator
35
javaSourceLookupDirector.name= Java Source Locator
33
36
(-)schema/launchDelegates.exsd (-198 / +212 lines)
Lines 1-198 Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.debug.core">
3
<schema targetNamespace="org.eclipse.debug.core">
4
<annotation>
4
<annotation>
5
      <appInfo>
5
      <appInfo>
6
         <meta.schema plugin="org.eclipse.debug.core" id="launchDelegates" name="Launch Delegates"/>
6
         <meta.schema plugin="org.eclipse.debug.core" id="launchDelegates" name="Launch Delegates"/>
7
      </appInfo>
7
      </appInfo>
8
      <documentation>
8
      <documentation>
9
         This extension point provides a mechanism for contributing a launch delegate to an existing launch configuration type for one or more launch modes. Since launch modes are extensible, it may be neccessary to contribute additional launch delegates to an existing launch configuration type. Each launch delegate is contributed for a specific launch configuration type. A launch delegate supports one or more launch modes, and specifies a delegate responsible for the implementation of launching.
9
         This extension point provides a mechanism for contributing a launch delegate to an existing launch configuration type for one or more launch modes. Since launch modes are extensible, it may be neccessary to contribute additional launch delegates to an existing launch configuration type. Each launch delegate is contributed for a specific launch configuration type. A launch delegate supports one or more launch modes, and specifies a delegate responsible for the implementation of launching.
10
      </documentation>
10
      </documentation>
11
   </annotation>
11
   </annotation>
12
12
13
   <element name="extension">
13
   <element name="extension">
14
      <complexType>
14
      <complexType>
15
         <sequence>
15
         <sequence>
16
            <element ref="launchDelegate" minOccurs="1" maxOccurs="unbounded"/>
16
            <element ref="launchDelegate" minOccurs="1" maxOccurs="unbounded"/>
17
         </sequence>
17
         </sequence>
18
         <attribute name="point" type="string" use="required">
18
         <attribute name="point" type="string" use="required">
19
            <annotation>
19
            <annotation>
20
               <documentation>
20
               <documentation>
21
                  a fully qualified identifier of the target extension point
21
                  a fully qualified identifier of the target extension point
22
               </documentation>
22
               </documentation>
23
            </annotation>
23
            </annotation>
24
         </attribute>
24
         </attribute>
25
         <attribute name="id" type="string">
25
         <attribute name="id" type="string">
26
            <annotation>
26
            <annotation>
27
               <documentation>
27
               <documentation>
28
                  an optional identifier of the extension instance
28
                  an optional identifier of the extension instance
29
               </documentation>
29
               </documentation>
30
            </annotation>
30
            </annotation>
31
         </attribute>
31
         </attribute>
32
         <attribute name="name" type="string">
32
         <attribute name="name" type="string">
33
            <annotation>
33
            <annotation>
34
               <documentation>
34
               <documentation>
35
                  an optional name of the extension instance
35
                  an optional name of the extension instance
36
               </documentation>
36
               </documentation>
37
            </annotation>
37
            </annotation>
38
         </attribute>
38
         </attribute>
39
      </complexType>
39
      </complexType>
40
   </element>
40
   </element>
41
41
42
   <element name="launchDelegate">
42
   <element name="launchDelegate">
43
      <annotation>
43
      <annotation>
44
         <appInfo>
44
         <appInfo>
45
            <meta.element labelAttribute="name"/>
45
            <meta.element labelAttribute="name"/>
46
         </appInfo>
46
         </appInfo>
47
      </annotation>
47
      </annotation>
48
      <complexType>
48
      <complexType>
49
         <sequence minOccurs="0" maxOccurs="unbounded">
49
         <sequence minOccurs="0" maxOccurs="unbounded">
50
            <element ref="modeCombination" minOccurs="1" maxOccurs="unbounded"/>
50
            <element ref="modeCombination" minOccurs="1" maxOccurs="unbounded"/>
51
         </sequence>
51
         </sequence>
52
         <attribute name="id" type="string" use="required">
52
         <attribute name="id" type="string" use="required">
53
            <annotation>
53
            <annotation>
54
               <documentation>
54
               <documentation>
55
                  specifies a unique identifier for this launch delegate.
55
                  specifies a unique identifier for this launch delegate.
56
               </documentation>
56
               </documentation>
57
            </annotation>
57
            </annotation>
58
         </attribute>
58
         </attribute>
59
         <attribute name="name" type="string">
59
         <attribute name="name" type="string">
60
            <annotation>
60
            <annotation>
61
               <documentation>
61
               <documentation>
62
                  A human readable name for this delegate. This attribute was added in the 3.3. release.
62
                  A human readable name for this delegate. This attribute was added in the 3.3. release.
63
&lt;p&gt;
63
&lt;p&gt;
64
An example of a &apos;human readable name&apos; would be something like (in the case of the default java application delegate): Eclipse JDT Java Tooling
64
An example of a &apos;human readable name&apos; would be something like (in the case of the default java application delegate): Eclipse JDT Java Tooling
65
&lt;/p&gt;
65
&lt;/p&gt;
66
&lt;p&gt;
66
&lt;p&gt;
67
&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;. This attribute has been added as
67
&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;. This attribute has been added as
68
part of a work in progress. There is no guarantee that this API will
68
part of a work in progress. There is no guarantee that this API will
69
remain unchanged during the 3.3 release cycle. Please do not use this API
69
remain unchanged during the 3.3 release cycle. Please do not use this API
70
without consulting with the Platform/Debug team.
70
without consulting with the Platform/Debug team.
71
&lt;/p&gt;
71
&lt;/p&gt;
72
               </documentation>
72
               </documentation>
73
               <appInfo>
73
               <appInfo>
74
                  <meta.attribute translatable="true"/>
74
                  <meta.attribute translatable="true"/>
75
               </appInfo>
75
               </appInfo>
76
            </annotation>
76
            </annotation>
77
         </attribute>
77
         </attribute>
78
         <attribute name="delegate" type="string" use="required">
78
         <attribute name="delegate" type="string" use="required">
79
            <annotation>
79
            <annotation>
80
               <documentation>
80
               <documentation>
81
                  specifies the fully qualified name of the Java class that implements &lt;code&gt;ILaunchConfigurationDelegate&lt;/code&gt;.
81
                  specifies the fully qualified name of the Java class that implements &lt;code&gt;ILaunchConfigurationDelegate&lt;/code&gt;.
82
Launch configuration instances of this delegate&apos;s type will delegate to instances of this class to perform launching.
82
Launch configuration instances of this delegate&apos;s type will delegate to instances of this class to perform launching.
83
               </documentation>
83
               </documentation>
84
               <appInfo>
84
               <appInfo>
85
                  <meta.attribute kind="java" basedOn="org.eclipse.debug.core.model.ILaunchConfigurationDelegate"/>
85
                  <meta.attribute kind="java" basedOn="org.eclipse.debug.core.model.ILaunchConfigurationDelegate"/>
86
               </appInfo>
86
               </appInfo>
87
            </annotation>
87
            </annotation>
88
         </attribute>
88
         </attribute>
89
         <attribute name="modes" type="string">
89
         <attribute name="modes" type="string">
90
            <annotation>
90
            <annotation>
91
               <documentation>
91
               <documentation>
92
                  A comma-separated list of the launch modes this delegate supports.
92
                  A comma-separated list of the launch modes this delegate supports.
93
93
94
&lt;p&gt;
94
&lt;p&gt;
95
New in 3.3: the comma seperated list of modes provided here, instead of via the modeCombination sub elements, will result in a set being created for each mode individually with no other combinations.
95
New in 3.3: the comma seperated list of modes provided here, instead of via the modeCombination sub elements, will result in a set being created for each mode individually with no other combinations. For example specifying: &apos;run,debug&apos; will result in a set of two elements [[run], [debug]] (where run and debug are each in their own set).
96
&lt;/p&gt;
96
&lt;/p&gt;
97
               </documentation>
97
&lt;p&gt;
98
            </annotation>
98
This attribute can be used in conjunction with modeCombination contributions. It is however, desirable to provide one or the other and not both (either a comma seperated listing in the modes attribute, or modeCombinations). Specifying &apos;run,debug&apos; in the modes attribute is analogous to specifying two modeCombination contributions, one for &apos;run&apos; and another for &apos;debug&apos;.
99
         </attribute>
99
&lt;/p&gt;
100
         <attribute name="type" type="string">
100
               </documentation>
101
            <annotation>
101
            </annotation>
102
               <documentation>
102
         </attribute>
103
                  identifier of an existing launch configuration type that this launch delegate is capable of launching.
103
         <attribute name="type" type="string">
104
               </documentation>
104
            <annotation>
105
            </annotation>
105
               <documentation>
106
         </attribute>
106
                  identifier of an existing launch configuration type that this launch delegate is capable of launching.
107
         <attribute name="sourcePathComputerId" type="string">
107
               </documentation>
108
            <annotation>
108
            </annotation>
109
               <documentation>
109
         </attribute>
110
                  The unique identifier of a sourcePathComputer extension that is used to compute a default source lookup path for launch configurations of this type. Since 3.1, this attribute cab be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source path computer can be specified per launch configuration type.
110
         <attribute name="sourcePathComputerId" type="string">
111
               </documentation>
111
            <annotation>
112
            </annotation>
112
               <documentation>
113
         </attribute>
113
                  The unique identifier of a sourcePathComputer extension that is used to compute a default source lookup path for launch configurations of this type. Since 3.1, this attribute cab be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source path computer can be specified per launch configuration type.
114
         <attribute name="sourceLocatorId" type="string">
114
               </documentation>
115
            <annotation>
115
            </annotation>
116
               <documentation>
116
         </attribute>
117
                  The unique identifier of a sourceLocator extension that is used to create the source locator for sessions launched using launch configurations of this type. Since 3.1, this attribute can be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source locater can be specified per launch configuration type.
117
         <attribute name="sourceLocatorId" type="string">
118
               </documentation>
118
            <annotation>
119
            </annotation>
119
               <documentation>
120
         </attribute>
120
                  The unique identifier of a sourceLocator extension that is used to create the source locator for sessions launched using launch configurations of this type. Since 3.1, this attribute can be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source locater can be specified per launch configuration type.
121
      </complexType>
121
               </documentation>
122
   </element>
122
            </annotation>
123
123
         </attribute>
124
   <element name="modeCombination">
124
         <attribute name="delegateDescription" type="string">
125
      <annotation>
125
            <annotation>
126
         <documentation>
126
               <documentation>
127
            This element represents a collection of mode combinations that this delegate can launch. Each modeCombination attribute is a comma seperated list specifying a combination of modes the delegate supports. For example, a delegate that supports debugging, profiling and code coverage might have a modeCombination of consisting of debug, profile, and coverage. This element was added in the 3.3 release. EXPERIMENTAL.
127
                  This attribute provides a description of this launch delegate i.e. what it does and what tooling it is assciated with. This attribute was added in the 3.3 release. EXPERIMENTAL.
128
         </documentation>
128
               </documentation>
129
      </annotation>
129
            </annotation>
130
      <complexType>
130
         </attribute>
131
         <attribute name="modes" type="string" use="required">
131
      </complexType>
132
            <annotation>
132
   </element>
133
               <documentation>
133
134
                  a comma seperated list specifying a combination of modes the associated delegate can launch. This attribute was added in the 3.3 release. EXPERIMENTAL.
134
   <element name="modeCombination">
135
               </documentation>
135
      <annotation>
136
            </annotation>
136
         <documentation>
137
         </attribute>
137
            This element represents a collection of mode combinations that this delegate can launch. Each modeCombination attribute is a comma seperated list specifying a combination of modes the delegate supports. For example, a delegate that supports debugging, profiling and code coverage might have a modeCombination of consisting of debug, profile, and coverage. This element was added in the 3.3 release. EXPERIMENTAL.
138
      </complexType>
138
         </documentation>
139
   </element>
139
      </annotation>
140
140
      <complexType>
141
   <annotation>
141
         <attribute name="modes" type="string" use="required">
142
      <appInfo>
142
            <annotation>
143
         <meta.section type="since"/>
143
               <documentation>
144
      </appInfo>
144
                  a comma seperated list specifying a combination of modes the associated delegate can launch. This attribute was added in the 3.3 release. EXPERIMENTAL.
145
      <documentation>
145
146
         3.0
146
&lt;p&gt;
147
      </documentation>
147
Unlike the modes attribute of the main definition, this comma seperated listing is taken to be one set inclusively. For example: a modeCombination of &apos;profile,debug&apos; would result in a single set of modes [[profile, debug]] and not a set with two distinct entries for each of profile and debug [[profile], [debug]] (unlike the other modes attribute from the main definition). 
148
   </annotation>
148
&lt;/p&gt;
149
149
               </documentation>
150
   <annotation>
150
            </annotation>
151
      <appInfo>
151
         </attribute>
152
         <meta.section type="examples"/>
152
      </complexType>
153
      </appInfo>
153
   </element>
154
      <documentation>
154
155
         The following is an example of a launch delegate extension point:
155
   <annotation>
156
156
      <appInfo>
157
&lt;p&gt;
157
         <meta.section type="since"/>
158
&lt;pre&gt;
158
      </appInfo>
159
 &lt;extension point=&quot;org.eclipse.debug.core.launchDelegates&quot;&gt;
159
      <documentation>
160
  &lt;launchDelegate
160
         3.0
161
   id=&quot;com.example.ExampleProfileDelegate&quot;
161
      </documentation>
162
   delegate=&quot;com.example.ExampleProfileDelegate&quot;
162
   </annotation>
163
   type=&quot;org.eclipse.jdt.launching.localJavaApplication&quot;
163
164
   name=&quot;Eclipse JDT Java Profile Tooling&quot;&gt;
164
   <annotation>
165
  &lt;/launchDelegate&gt;
165
      <appInfo>
166
  &lt;modeCombination modes=&quot;run, profile&quot;&gt;&lt;/modeCombination&gt;
166
         <meta.section type="examples"/>
167
  &lt;modeCombination modes=&quot;debug, profile, coverage&quot;&gt;&lt;/modeCombination&gt;
167
      </appInfo>
168
 &lt;/extension&gt;
168
      <documentation>
169
&lt;/pre&gt;
169
         The following is an example of a launch delegate extension point:
170
&lt;/p&gt;
170
171
171
&lt;p&gt;
172
In the example above, the specified launch delegate is contributed to launch Java applications in profile mode. The delegate supports mixed mode launching. The delegate supports profiling when launching in run or debug mode, with code coverage in debug mode only.
172
&lt;pre&gt;
173
      </documentation>
173
 &lt;extension point=&quot;org.eclipse.debug.core.launchDelegates&quot;&gt;
174
   </annotation>
174
  &lt;launchDelegate
175
175
   id=&quot;com.example.ExampleProfileDelegate&quot;
176
   <annotation>
176
   delegate=&quot;com.example.ExampleProfileDelegate&quot;
177
      <appInfo>
177
   type=&quot;org.eclipse.jdt.launching.localJavaApplication&quot;
178
         <meta.section type="apiInfo"/>
178
   name=&quot;Eclipse JDT Java Profile Tooling&quot;&gt;
179
      </appInfo>
179
  &lt;/launchDelegate&gt;
180
      <documentation>
180
  &lt;modeCombination modes=&quot;run, profile&quot;&gt;&lt;/modeCombination&gt;
181
         Value of the attribute &lt;b&gt;delegate&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.debug.core.model.ILaunchConfigurationDelegate&lt;/b&gt;.
181
  &lt;modeCombination modes=&quot;debug, profile, coverage&quot;&gt;&lt;/modeCombination&gt;
182
      </documentation>
182
 &lt;/extension&gt;
183
   </annotation>
183
&lt;/pre&gt;
184
184
&lt;/p&gt;
185
   <annotation>
185
186
      <appInfo>
186
In the example above, the specified launch delegate is contributed to launch Java applications in profile mode. The delegate supports mixed mode launching. The delegate supports profiling when launching in run or debug mode, with code coverage in debug mode only.
187
         <meta.section type="copyright"/>
187
      </documentation>
188
      </appInfo>
188
   </annotation>
189
      <documentation>
189
190
         Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
190
   <annotation>
191
All rights reserved. This program and the accompanying materials are made 
191
      <appInfo>
192
available under the terms of the Eclipse Public License v1.0 which 
192
         <meta.section type="apiInfo"/>
193
accompanies this distribution, and is available at 
193
      </appInfo>
194
&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
194
      <documentation>
195
      </documentation>
195
         Value of the attribute &lt;b&gt;delegate&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.debug.core.model.ILaunchConfigurationDelegate&lt;/b&gt;.
196
   </annotation>
196
      </documentation>
197
197
   </annotation>
198
</schema>
198
199
   <annotation>
200
      <appInfo>
201
         <meta.section type="copyright"/>
202
      </appInfo>
203
      <documentation>
204
         Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
205
All rights reserved. This program and the accompanying materials are made 
206
available under the terms of the Eclipse Public License v1.0 which 
207
accompanies this distribution, and is available at 
208
&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
209
      </documentation>
210
   </annotation>
211
212
</schema>
(-)schema/launchConfigurationTypes.exsd (-23 / +3 lines)
Lines 130-154 Link Here
130
               </appInfo>
130
               </appInfo>
131
            </annotation>
131
            </annotation>
132
         </attribute>
132
         </attribute>
133
         <attribute name="icon" type="string">
134
            <annotation>
135
               <documentation>
136
                  The id of the icon for this launch configuraiton type.
137
138
since 3.3
139
140
&lt;p&gt;
141
&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;. This element has been added as
142
part of a work in progress. There is no guarantee that this API will
143
remain unchanged during the 3.3 release cycle. Please do not use this API
144
without consulting with the Platform/Debug team.
145
&lt;/p&gt;
146
               </documentation>
147
               <appInfo>
148
                  <meta.attribute kind="resource"/>
149
               </appInfo>
150
            </annotation>
151
         </attribute>
152
         <attribute name="delegateName" type="string">
133
         <attribute name="delegateName" type="string">
153
            <annotation>
134
            <annotation>
154
               <documentation>
135
               <documentation>
Lines 245-254 Link Here
245
      </appInfo>
226
      </appInfo>
246
      <documentation>
227
      <documentation>
247
         &lt;p&gt;
228
         &lt;p&gt;
248
Value of the attribute &lt;b&gt;delegate&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;code&gt;org.eclipse.debug.core.model.ILaunchConfigurationDelegate&lt;/code&gt;. 
229
Value of the attribute &lt;b&gt;delegate&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.debug.core.model.ILaunchConfigurationDelegate&lt;/b&gt;. 
249
&lt;/p&gt;
230
250
&lt;p&gt;
231
The value of the attribute &lt;b&gt;migrationDelegate&lt;/b&gt; must be a fully qualified name of a Java class that implements &lt;b&gt;org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate&lt;/b&gt;.
251
The value of the attribute &lt;b&gt;migrationDelegate&lt;/b&gt; must be a fully qualified name of a Java class that implements &lt;code&gt;org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate&lt;/code&gt;.
252
&lt;/p&gt;
232
&lt;/p&gt;
253
      </documentation>
233
      </documentation>
254
   </annotation>
234
   </annotation>
(-)core/org/eclipse/debug/internal/core/LaunchConfigurationType.java (-7 lines)
Lines 492-504 Link Here
492
	public String getContributorName() {
492
	public String getContributorName() {
493
		return fElement.getContributor().getName();
493
		return fElement.getContributor().getName();
494
	}
494
	}
495
	
496
	/* (non-Javadoc)
497
	 * @see org.eclipse.debug.core.ILaunchConfigurationType#getImageDescriptorId()
498
	 */
499
	public String getImageDescriptorPath() {
500
		return fElement.getAttribute(IConfigurationElementConstants.ICON);
501
	}
502
495
503
	/* (non-Javadoc)
496
	/* (non-Javadoc)
504
	 * @see org.eclipse.debug.core.ILaunchConfigurationType#supportsModeCombination(java.util.Set)
497
	 * @see org.eclipse.debug.core.ILaunchConfigurationType#supportsModeCombination(java.util.Set)
(-)core/org/eclipse/debug/internal/core/DebugCoreMessages.properties (+1 lines)
Lines 51-56 Link Here
51
LaunchManager_does_not_exist=Launch configuration {0} at {1} does not exist.
51
LaunchManager_does_not_exist=Launch configuration {0} at {1} does not exist.
52
LaunchManager_Source_locator_does_not_exist___0__13=Source locator does not exist: {0}
52
LaunchManager_Source_locator_does_not_exist___0__13=Source locator does not exist: {0}
53
LaunchManager_30=Unable to retrieve shared launch configuration file for {0}
53
LaunchManager_30=Unable to retrieve shared launch configuration file for {0}
54
LaunchDelegate_0=No description provided.
54
LaunchMode_1=Required attribute {0} missing for launchMode extension.
55
LaunchMode_1=Required attribute {0} missing for launchMode extension.
55
LaunchMode_0={0} As
56
LaunchMode_0={0} As
56
LaunchOption_0=Required attribute {0} missing for launch option extension
57
LaunchOption_0=Required attribute {0} missing for launch option extension
(-)core/org/eclipse/debug/internal/core/LaunchDelegate.java (+18 lines)
Lines 188-191 Link Here
188
	public String getSourcePathComputerId() {
188
	public String getSourcePathComputerId() {
189
		return fElement.getAttribute(IConfigurationElementConstants.SOURCE_PATH_COMPUTER);
189
		return fElement.getAttribute(IConfigurationElementConstants.SOURCE_PATH_COMPUTER);
190
	}
190
	}
191
	
192
	/**
193
	 * @see org.eclipse.debug.core.ILaunchDelegate#getDescription()
194
	 */
195
	public String getDescription() {
196
		String desc = fElement.getAttribute(IConfigurationElementConstants.DELEGATE_DESCRIPTION);
197
		if(desc == null) {
198
			return DebugCoreMessages.LaunchDelegate_0;
199
		}
200
		return desc;
201
	}
202
	
203
	/**
204
	 * @see org.eclipse.debug.core.ILaunchDelegate#getPluginIdentifier()
205
	 */
206
	public String getPluginIdentifier() {
207
		return fElement.getContributor().getName();
208
	}
191
}
209
}
(-)core/org/eclipse/debug/internal/core/IConfigurationElementConstants.java (+10 lines)
Lines 47-52 Link Here
47
	public static final String PLACEMENT = "placement"; //$NON-NLS-1$
47
	public static final String PLACEMENT = "placement"; //$NON-NLS-1$
48
	
48
	
49
	/**
49
	/**
50
	 * the associated launch delegate node name for s configuration element
51
	 */
52
	public static final String ASSOCIATED_DELEGATE = "associatedDelegate"; //$NON-NLS-1$
53
	
54
	/**
50
	 * the label node name for a configuration element
55
	 * the label node name for a configuration element
51
	 */
56
	 */
52
	public static final String LABEL = "label"; //$NON-NLS-1$
57
	public static final String LABEL = "label"; //$NON-NLS-1$
Lines 127-132 Link Here
127
	public static final String SOURCE_PATH_COMPUTER = "sourcePathComputerId"; //$NON-NLS-1$
132
	public static final String SOURCE_PATH_COMPUTER = "sourcePathComputerId"; //$NON-NLS-1$
128
	
133
	
129
	/**
134
	/**
135
	 * the delegateDescription node name for a configuraiton element
136
	 */
137
	public static final String DELEGATE_DESCRIPTION = "delegateDescription"; //$NON-NLS-1$
138
	
139
	/**
130
	 * the sourceLocatorId node name for a configuration element
140
	 * the sourceLocatorId node name for a configuration element
131
	 */
141
	 */
132
	public static final String SOURCE_LOCATOR = "sourceLocatorId"; //$NON-NLS-1$
142
	public static final String SOURCE_LOCATOR = "sourceLocatorId"; //$NON-NLS-1$
(-)core/org/eclipse/debug/internal/core/DebugCoreMessages.java (+2 lines)
Lines 33-38 Link Here
33
33
34
	public static String LaunchConfigurationType_7;
34
	public static String LaunchConfigurationType_7;
35
35
36
	public static String LaunchDelegate_0;
37
36
	public static String LaunchOption_0;
38
	public static String LaunchOption_0;
37
	public static String SystemPropertyResolver_0;	
39
	public static String SystemPropertyResolver_0;	
38
	public static String InputStreamMonitor_label;
40
	public static String InputStreamMonitor_label;
(-)core/org/eclipse/debug/core/ILaunchConfigurationType.java (-15 lines)
Lines 324-343 Link Here
324
	 * </p>
324
	 * </p>
325
	 */
325
	 */
326
	public String getContributorName();
326
	public String getContributorName();
327
	
328
	/**
329
	 * Returns the plug-in relative path of the image for this launch configuration type.
330
	 * 
331
	 * @return plug-in relative path for image
332
	 * @since 3.3
333
	 * 
334
	 * <p>
335
	 * <strong>EXPERIMENTAL</strong>. This method has been added as
336
	 * part of a work in progress. There is no guarantee that this API will
337
	 * remain unchanged during the 3.3 release cycle. Please do not use this API
338
	 * without consulting with the Platform/Debug team.
339
	 * </p>
340
	 */
341
	public String getImageDescriptorPath();
342
327
343
}
328
}
(-)core/org/eclipse/debug/core/ILaunchDelegate.java (+13 lines)
Lines 46-51 Link Here
46
	public String getName();
46
	public String getName();
47
	
47
	
48
	/**
48
	/**
49
	 * Returns a description of this launch delegate, or 
50
	 * <code>null</code> if one has not been provided
51
	 * @return the description of the launch delegate
52
	 */
53
	public String getDescription();
54
	
55
	/**
49
	 * Returns the name of the plug-in that contributed this delegate.
56
	 * Returns the name of the plug-in that contributed this delegate.
50
	 * 
57
	 * 
51
	 * @return contributor name
58
	 * @return contributor name
Lines 69-72 Link Here
69
	 */
76
	 */
70
	public List getModes();
77
	public List getModes();
71
	
78
	
79
	/**
80
	 * Returns the id of the plugin that contributed this launch delegate
81
	 * @return the id of the plugin that contributed this launch delegate
82
	 */
83
	public String getPluginIdentifier();
84
	
72
}
85
}
(-)ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java (-5 / +32 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui;
11
package org.eclipse.debug.internal.ui;
12
12
13
import java.util.HashSet;
14
import java.util.Set;
15
13
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.core.runtime.CoreException;
14
import org.eclipse.core.runtime.IConfigurationElement;
17
import org.eclipse.core.runtime.IConfigurationElement;
15
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
18
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
Lines 32-37 Link Here
32
	 * The configuration element backing this proxy
35
	 * The configuration element backing this proxy
33
	 */
36
	 */
34
	IConfigurationElement fElement = null;
37
	IConfigurationElement fElement = null;
38
	private Set fDelegates = null;
35
	
39
	
36
	/**
40
	/**
37
	 * Constructor
41
	 * Constructor
Lines 42-48 Link Here
42
	}
46
	}
43
	
47
	
44
	/**
48
	/**
45
	 * Returns the unique id ofthe tab
49
	 * Returns the unique id of the tab
46
	 * @return the unique id of the tab
50
	 * @return the unique id of the tab
47
	 */
51
	 */
48
	public String getIdentifier() {
52
	public String getIdentifier() {
Lines 83-91 Link Here
83
	 * This method returns the id of the tab that this tab should be placed immediately after.
87
	 * This method returns the id of the tab that this tab should be placed immediately after.
84
	 * @return the id of the relative tab or <code>null</code> if one has not been specified
88
	 * @return the id of the relative tab or <code>null</code> if one has not been specified
85
	 * 
89
	 * 
86
	 * @since 3.3
87
	 * 
88
	 * EXPERIMENTAL
89
	 */
90
	 */
90
	public String getRelativeTabId() {
91
	public String getRelativeTabId() {
91
		IConfigurationElement[] elems = fElement.getChildren(IConfigurationElementConstants.PLACEMENT);
92
		IConfigurationElement[] elems = fElement.getChildren(IConfigurationElementConstants.PLACEMENT);
Lines 94-98 Link Here
94
		}
95
		}
95
		return null;
96
		return null;
96
	}
97
	}
97
98
	
99
	/**
100
	 * Returns the id of the plugin that contributed this tab extension
101
	 * @return the id of the plugin tat contirbuted this tab
102
	 */
103
	public String getPluginIdentifier() {
104
		return fElement.getContributor().getName();
105
	}
106
	
107
	/**
108
	 * Returns a set of strings of the launch delegates that this tab contribution is associated with
109
	 * @return the set of strings of the associated launch delegates, which can be an empty collection, never <code>null</code>.
110
	 */
111
	public Set getDelegateSet() {
112
		if(fDelegates == null) {
113
			fDelegates = new HashSet();
114
			IConfigurationElement[] children = fElement.getChildren(IConfigurationElementConstants.ASSOCIATED_DELEGATE);
115
			String id = null;
116
			for(int i = 0; i < children.length; i++) {
117
				id = children[i].getAttribute(IConfigurationElementConstants.DELEGATE);
118
				if(id != null) {
119
					fDelegates.add(id);
120
				}
121
			}
122
		}
123
		return fDelegates;
124
	}
98
}
125
}
(-)ui/org/eclipse/debug/internal/ui/SWTUtil.java (+36 lines)
Lines 166-171 Link Here
166
	}
166
	}
167
	
167
	
168
	/**
168
	/**
169
	 * Creates a wrapping label
170
	 * @param parent the parent composite to add this label to
171
	 * @param text the text to be displayed in the label
172
	 * @param hspan the horozontal span that label should take up in the parent composite
173
	 * @return a new label that wraps at a specified width
174
	 * @since 3.3
175
	 */
176
	public static Label createWrapLabel(Composite parent, String text, int hspan) {
177
		Label l = new Label(parent, SWT.NONE | SWT.WRAP);
178
		l.setFont(parent.getFont());
179
		l.setText(text);
180
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
181
		gd.horizontalSpan = hspan;
182
		l.setLayoutData(gd);
183
		return l;
184
	}
185
	
186
	/**
169
	 * Creates a new text widget 
187
	 * Creates a new text widget 
170
	 * @param parent the parent composite to add this text widget to
188
	 * @param parent the parent composite to add this text widget to
171
	 * @param hspan the horizontal span to take up on the parent composite
189
	 * @param hspan the horizontal span to take up on the parent composite
Lines 187-192 Link Here
187
	 * @param parent the parent composite to add this text widget to
205
	 * @param parent the parent composite to add this text widget to
188
	 * @param style the style bits for the text widget
206
	 * @param style the style bits for the text widget
189
	 * @param hspan the horizontal span to take up on the parent composite
207
	 * @param hspan the horizontal span to take up on the parent composite
208
	 * @param fill the fill for the grid layout
209
	 * @return the new text widget
210
	 * @since 3.3
211
	 */
212
	public static Text createText(Composite parent, int style, int hspan, int fill) {
213
    	Text t = new Text(parent, style);
214
    	t.setFont(parent.getFont());
215
    	GridData gd = new GridData(fill);
216
    	gd.horizontalSpan = hspan;
217
    	t.setLayoutData(gd);
218
    	return t;
219
    }
220
	
221
	/**
222
	 * Creates a new text widget 
223
	 * @param parent the parent composite to add this text widget to
224
	 * @param style the style bits for the text widget
225
	 * @param hspan the horizontal span to take up on the parent composite
190
	 * @return the new text widget
226
	 * @return the new text widget
191
	 * @since 3.3
227
	 * @since 3.3
192
	 */
228
	 */
(-)ui/org/eclipse/debug/internal/ui/DebugPluginImages.java (-33 / +13 lines)
Lines 14-29 Link Here
14
14
15
15
16
import java.net.URL;
16
import java.net.URL;
17
import java.util.HashSet;
18
import java.util.Set;
19
17
20
import org.eclipse.core.runtime.FileLocator;
18
import org.eclipse.core.runtime.FileLocator;
21
import org.eclipse.core.runtime.IConfigurationElement;
19
import org.eclipse.core.runtime.IConfigurationElement;
22
import org.eclipse.core.runtime.IExtensionPoint;
20
import org.eclipse.core.runtime.IExtensionPoint;
23
import org.eclipse.core.runtime.Path;
21
import org.eclipse.core.runtime.Path;
24
import org.eclipse.core.runtime.Platform;
22
import org.eclipse.core.runtime.Platform;
25
import org.eclipse.debug.core.DebugPlugin;
26
import org.eclipse.debug.core.ILaunchConfigurationType;
27
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
23
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
28
import org.eclipse.debug.ui.IDebugUIConstants;
24
import org.eclipse.debug.ui.IDebugUIConstants;
29
import org.eclipse.jface.resource.ImageDescriptor;
25
import org.eclipse.jface.resource.ImageDescriptor;
Lines 236-271 Link Here
236
		
232
		
237
		// launch configuration types
233
		// launch configuration types
238
		//try to get the images from the config types themselves, cache those that could not be found
234
		//try to get the images from the config types themselves, cache those that could not be found
239
		ILaunchConfigurationType[] types = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes();
235
		IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES);
240
		String path = null;
236
		IConfigurationElement[] configElements= extensionPoint.getConfigurationElements();
241
		Set missing = new HashSet();
237
		for (int i = 0; i < configElements.length; i++) {
242
		ImageDescriptor descriptor = null;
238
			IConfigurationElement configElement = configElements[i];
243
		for (int i = 0; i < types.length; i++) {
239
			ImageDescriptor descriptor = DebugUIPlugin.getImageDescriptor(configElement, ATTR_LAUNCH_CONFIG_TYPE_ICON);
244
			path = types[i].getImageDescriptorPath();
240
			if (descriptor == null) {
245
			if(path == null) {
241
				descriptor = ImageDescriptor.getMissingImageDescriptor();
246
				missing.add(types[i].getIdentifier());
247
			}
248
			else {
249
				descriptor = DebugUIPlugin.getImageDescriptor(types[i].getContributorName(), path);
250
				imageRegistry.put(types[i].getIdentifier(), (descriptor == null ? ImageDescriptor.getMissingImageDescriptor() : descriptor));
251
			}
252
		}
253
		if(missing.size() > 0) {
254
			//if we are missing some images try to find them in the deprecated extension point
255
			IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES);
256
			IConfigurationElement[] configElements = extensionPoint.getConfigurationElements();
257
			String configTypeID = null;
258
			for (int i = 0; i < configElements.length; i++) {
259
				configTypeID = configElements[i].getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ID);
260
				if (configTypeID == null) {
261
					// bug 12652
262
					configTypeID = configElements[i].getAttribute(IConfigurationElementConstants.TYPE);
263
				}
264
				if(missing.contains(configTypeID)) {
265
					descriptor = DebugUIPlugin.getImageDescriptor(configElements[i], ATTR_LAUNCH_CONFIG_TYPE_ICON);		
266
					imageRegistry.put(configTypeID, (descriptor == null ? ImageDescriptor.getMissingImageDescriptor() : descriptor));
267
				}
268
			}
242
			}
243
			String configTypeID = configElement.getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ID);
244
			if (configTypeID == null) {
245
				// bug 12652
246
				configTypeID = configElement.getAttribute(IConfigurationElementConstants.TYPE);
247
			}			
248
			imageRegistry.put(configTypeID, descriptor);				
269
		}
249
		}
270
	}
250
	}
271
251
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties (+1 lines)
Lines 177-182 Link Here
177
SelectLaunchDelegatesDialog_0=There is more than one set of tooling capable of launching the current configuration in the current mode. Please select which launch tooling you would like to use.
177
SelectLaunchDelegatesDialog_0=There is more than one set of tooling capable of launching the current configuration in the current mode. Please select which launch tooling you would like to use.
178
SelectLaunchDelegatesDialog_1=Select Launch Tooling
178
SelectLaunchDelegatesDialog_1=Select Launch Tooling
179
SelectLaunchDelegatesDialog_2=Select &preferred launch tooling:
179
SelectLaunchDelegatesDialog_2=Select &preferred launch tooling:
180
SelectLaunchDelegatesDialog_3=Description
180
SelectLaunchDelegateActionDialog_0=Select Resolution Action
181
SelectLaunchDelegateActionDialog_0=Select Resolution Action
181
SelectLaunchDelegateActionDialog_1=More than one tool capable of launching the current configuration has been detected and preferred tooling must be selected so that launching can continue.\n\nCanceling this or any following dialog(s) will cancel the current launch.
182
SelectLaunchDelegateActionDialog_1=More than one tool capable of launching the current configuration has been detected and preferred tooling must be selected so that launching can continue.\n\nCanceling this or any following dialog(s) will cancel the current launch.
182
SelectLaunchDelegateActionDialog_4=&Always perform the selected action.
183
SelectLaunchDelegateActionDialog_4=&Always perform the selected action.
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java (-32 / +57 lines)
Lines 3-11 Link Here
3
import java.util.ArrayList;
3
import java.util.ArrayList;
4
import java.util.List;
4
import java.util.List;
5
5
6
import org.eclipse.core.runtime.CoreException;
6
import org.eclipse.debug.core.ILaunch;
7
import org.eclipse.debug.core.ILaunch;
7
import org.eclipse.debug.core.ILaunchConfiguration;
8
import org.eclipse.debug.core.ILaunchConfiguration;
8
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
9
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
10
import org.eclipse.debug.internal.ui.DebugUIPlugin;
9
import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
11
import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
10
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
12
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
11
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
13
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
Lines 29-42 Link Here
29
	private ILaunchConfigurationTabGroup fGroup = null;
31
	private ILaunchConfigurationTabGroup fGroup = null;
30
	private String fGroupId = null;
32
	private String fGroupId = null;
31
	private List fTabs = null;
33
	private List fTabs = null;
34
	private String fMode = null;
35
	private ILaunchConfiguration fConfig = null;
32
	
36
	
33
	/**
37
	/**
34
	 * Constructor
38
	 * Constructor
35
	 * @param group the existing group to wrapper
39
	 * @param group the existing group to wrapper
40
	 * @param groupId the string id of the associated tab group
36
	 */
41
	 */
37
	public LaunchConfigurationTabGroupWrapper(ILaunchConfigurationTabGroup group, String groupId) {
42
	public LaunchConfigurationTabGroupWrapper(ILaunchConfigurationTabGroup group, String groupId, ILaunchConfiguration config) {
38
		fGroup = group;
43
		fGroup = group;
39
		fGroupId = groupId;
44
		fGroupId = groupId;
45
		fConfig = config;
40
	}
46
	}
41
	
47
	
42
	/**
48
	/**
Lines 45-50 Link Here
45
	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
51
	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
46
		if(fGroup != null) {
52
		if(fGroup != null) {
47
			fGroup.createTabs(dialog, mode);
53
			fGroup.createTabs(dialog, mode);
54
			fMode = mode;
48
		}
55
		}
49
	}
56
	}
50
57
Lines 65-114 Link Here
65
	 */
72
	 */
66
	public ILaunchConfigurationTab[] getTabs() {
73
	public ILaunchConfigurationTab[] getTabs() {
67
		if(fTabs == null) {
74
		if(fTabs == null) {
68
			fTabs = new ArrayList();
75
			try {
69
			ILaunchConfigurationTab[] tmp = fGroup.getTabs();
76
				fTabs = new ArrayList();
70
			for(int i = 0; i < tmp.length; i++) {
77
				ILaunchConfigurationTab[] tmp = fGroup.getTabs();
71
				fTabs.add(tmp[i]);
78
				for(int i = 0; i < tmp.length; i++) {
72
			}
79
					fTabs.add(tmp[i]);
73
			LaunchConfigurationTabExtension[] ext = LaunchConfigurationPresentationManager.getDefault().getTabExtensions(fGroupId);
80
				}
74
			//copy contributed into correct postion or end if no id or id is not found
81
				LaunchConfigurationTabExtension[] ext = LaunchConfigurationPresentationManager.getDefault().getTabExtensions(fGroupId, fConfig, fMode);
75
			AbstractLaunchConfigurationTab alct = null;
82
				//copy contributed into correct position or end if no id or id is not found
76
			String id = null;
83
				AbstractLaunchConfigurationTab alct = null;
77
			List item = null;
84
				String id = null;
78
			for(int i = 0; i < ext.length; i++) {
85
				List item = null;
79
				id = ext[i].getRelativeTabId();
86
				for(int i = 0; i < ext.length; i++) {
80
				if(id != null) {
87
					id = ext[i].getRelativeTabId();
81
					//position specified, try to find it
88
					if(id != null) {
82
					boolean found = false;
89
						//position specified, try to find it
83
					for(int j = 0; j < tmp.length; j++) {
90
						boolean found = false;
84
						if(tmp[j] instanceof AbstractLaunchConfigurationTab) {
91
						for(int j = 0; j < tmp.length; j++) {
85
							alct = (AbstractLaunchConfigurationTab) tmp[j];
92
							if(tmp[j] instanceof AbstractLaunchConfigurationTab) {
86
							if(id.equals(alct.getId())) {
93
								alct = (AbstractLaunchConfigurationTab) tmp[j];
87
								if(j != tmp.length-1) {
94
								if(id.equals(alct.getId())) {
88
									item = new ArrayList();
95
									if(j != tmp.length-1) {
89
									item.add(ext[i].getTab());
96
										item = new ArrayList();
90
									fTabs.addAll(j+1, item);
97
										item.add(ext[i].getTab());
91
									found = true;
98
										fTabs.addAll(j+1, item);
92
									break;
99
										found = true;
100
										break;
101
									}
93
								}
102
								}
94
							}
103
							}
95
						}
104
						}
105
						if(!found) {
106
							//id did not match any tabs, add it to the end
107
							fTabs.add(ext[i].getTab());
108
						}
96
					}
109
					}
97
					if(!found) {
110
					else {
98
						//id did not match any tabs, add it to the end
111
						//no position specified, add it to the end
99
						fTabs.add(ext[i].getTab());
112
						fTabs.add(ext[i].getTab());
100
					}
113
					}
101
				}
114
				}
102
				else {
103
					//no position specified, add it to the end
104
					fTabs.add(ext[i].getTab());
105
				}
106
			}
115
			}
116
			catch (CoreException ce) {DebugUIPlugin.log(ce);}
107
		}
117
		}
108
		return (ILaunchConfigurationTab[]) fTabs.toArray(new ILaunchConfigurationTab[fTabs.size()]);
118
		return (ILaunchConfigurationTab[]) fTabs.toArray(new ILaunchConfigurationTab[fTabs.size()]);
109
	}
119
	}
110
120
111
	/**
121
	/**
122
	 * This method is used internally to force a refresh on the current tab set to filter visible tabs
123
	 * 
124
	 * @since 3.3
125
	 */
126
	protected void refreshTabs() {
127
		if(fTabs != null) {
128
			for(int i = 0; i < fTabs.size(); i++) {
129
				((ILaunchConfigurationTab)fTabs.get(i)).dispose();
130
			}
131
			fTabs = null;
132
		}
133
		getTabs();
134
	}
135
	
136
	/**
112
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
137
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
113
	 */
138
	 */
114
	public void initializeFrom(ILaunchConfiguration configuration) {
139
	public void initializeFrom(ILaunchConfiguration configuration) {
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java (+2 lines)
Lines 218-223 Link Here
218
218
219
	public static String SelectLaunchDelegatesDialog_1;
219
	public static String SelectLaunchDelegatesDialog_1;
220
	public static String SelectLaunchDelegatesDialog_2;
220
	public static String SelectLaunchDelegatesDialog_2;
221
222
	public static String SelectLaunchDelegatesDialog_3;
221
	public static String SelectLaunchOptionsDialog_2;
223
	public static String SelectLaunchOptionsDialog_2;
222
	public static String SelectLaunchOptionsDialog_3;
224
	public static String SelectLaunchOptionsDialog_3;
223
	public static String SelectLaunchOptionsDialog_4;
225
	public static String SelectLaunchOptionsDialog_4;
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java (-5 / +14 lines)
Lines 67-72 Link Here
67
import org.eclipse.swt.widgets.Text;
67
import org.eclipse.swt.widgets.Text;
68
import org.eclipse.ui.IWorkbenchPreferenceConstants;
68
import org.eclipse.ui.IWorkbenchPreferenceConstants;
69
import org.eclipse.ui.PlatformUI;
69
import org.eclipse.ui.PlatformUI;
70
import org.eclipse.ui.activities.WorkbenchActivityHelper;
70
71
71
import com.ibm.icu.text.MessageFormat;
72
import com.ibm.icu.text.MessageFormat;
72
73
Lines 322-329 Link Here
322
							Object[] res = sld.getResult();
323
							Object[] res = sld.getResult();
323
							if(res != null) {
324
							if(res != null) {
324
								fTabType.setPreferredDelegate(modes, (ILaunchDelegate) res[0]);
325
								fTabType.setPreferredDelegate(modes, (ILaunchDelegate) res[0]);
325
								refresh();
326
								((LaunchConfigurationTabGroupWrapper)fTabGroup).refreshTabs();
326
								refreshStatus();
327
								disposeExistingTabs();
328
								displayInstanceTabs();
327
							}
329
							}
328
						}
330
						}
329
					}
331
					}
Lines 830-836 Link Here
830
			public void run() {
832
			public void run() {
831
				ILaunchConfigurationTabGroup tabGroup = null;
833
				ILaunchConfigurationTabGroup tabGroup = null;
832
				try {
834
				try {
833
					tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(configType, getLaunchConfigurationDialog().getMode());
835
					tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(getWorkingCopy(), getLaunchConfigurationDialog().getMode());
834
					finalArray[0] = tabGroup;
836
					finalArray[0] = tabGroup;
835
				} catch (CoreException ce) {
837
				} catch (CoreException ce) {
836
					finalArray[1] = ce;
838
					finalArray[1] = ce;
Lines 1080-1087 Link Here
1080
			if(config != null) {
1082
			if(config != null) {
1081
				Set modes = config.getModes();
1083
				Set modes = config.getModes();
1082
				modes.add(getLaunchConfigurationDialog().getMode());
1084
				modes.add(getLaunchConfigurationDialog().getMode());
1083
				if(fTabType.getDelegates(modes).length > 1) {
1085
				ILaunchDelegate[] delegates = LaunchConfigurationManager.filterLaunchDelegates(fTabType, modes);
1084
					return fTabType.getPreferredDelegate(modes) == null;
1086
				if(delegates.length > 1) {
1087
					ILaunchDelegate preferred = fTabType.getPreferredDelegate(modes);
1088
					if(preferred == null) {
1089
						return true;
1090
					}
1091
					else if(WorkbenchActivityHelper.filterItem(new LaunchDelegateContribution(preferred))) {
1092
						return true;
1093
					}
1085
				}
1094
				}
1086
			}
1095
			}
1087
		}
1096
		}
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java (-5 / +34 lines)
Lines 41-46 Link Here
41
import org.eclipse.debug.core.ILaunchConfiguration;
41
import org.eclipse.debug.core.ILaunchConfiguration;
42
import org.eclipse.debug.core.ILaunchConfigurationType;
42
import org.eclipse.debug.core.ILaunchConfigurationType;
43
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
43
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
44
import org.eclipse.debug.core.ILaunchDelegate;
44
import org.eclipse.debug.core.ILaunchListener;
45
import org.eclipse.debug.core.ILaunchListener;
45
import org.eclipse.debug.core.ILaunchManager;
46
import org.eclipse.debug.core.ILaunchManager;
46
import org.eclipse.debug.core.ILaunchMode;
47
import org.eclipse.debug.core.ILaunchMode;
Lines 202-208 Link Here
202
		}
203
		}
203
		return (ILaunchConfiguration[]) filteredConfigs.toArray(new ILaunchConfiguration[filteredConfigs.size()]);
204
		return (ILaunchConfiguration[]) filteredConfigs.toArray(new ILaunchConfiguration[filteredConfigs.size()]);
204
	}
205
	}
206
207
	/**
208
	 * Returns a listing of <code>IlaunchDeleagtes</code> that does not contain any delegates from disabled activities
209
	 * @param delegates the raw listing of delegates to filter
210
	 * @return the filtered listing of <code>ILaunchDelegate</code>s or an empty array, nevere <code>null</code>.
211
	 * @since 3.3
212
	 * 
213
	 * EXPERIMENTAL
214
	 */
215
	public static ILaunchDelegate[] filterLaunchDelegates(ILaunchConfigurationType type, Set modes) throws CoreException {
216
		IWorkbenchActivitySupport as = PlatformUI.getWorkbench().getActivitySupport();
217
		ILaunchDelegate[] delegates = type.getDelegates(modes);
218
		if(as == null) {
219
			return delegates;
220
		}
221
		HashSet set = new HashSet();
222
		for(int i = 0; i < delegates.length; i++) {
223
			//filter by capabilities
224
			if(!WorkbenchActivityHelper.filterItem(new LaunchDelegateContribution(delegates[i]))) {
225
				set.add(delegates[i]);
226
			}
227
		}
228
		return (ILaunchDelegate[]) set.toArray(new ILaunchDelegate[set.size()]);
229
	}
205
	
230
	
231
	/**
232
	 * Performs cleanup operations when the manager is being disposed of. 
233
	 */
206
	public void shutdown() {
234
	public void shutdown() {
207
		ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
235
		ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
208
		launchManager.removeLaunchListener(this);
236
		launchManager.removeLaunchListener(this);
Lines 218-232 Link Here
218
	/**
246
	/**
219
	 * @see ILaunchListener#launchRemoved(ILaunch)
247
	 * @see ILaunchListener#launchRemoved(ILaunch)
220
	 */
248
	 */
221
	public void launchRemoved(ILaunch launch) {
249
	public void launchRemoved(ILaunch launch) {}
222
	}
223
	
250
	
224
	/**
251
	/**
225
	 * @see ILaunchListener#launchChanged(ILaunch)
252
	 * @see ILaunchListener#launchChanged(ILaunch)
226
	 */
253
	 */
227
	public void launchChanged(ILaunch launch) {	
254
	public void launchChanged(ILaunch launch) {}
228
229
	}
230
255
231
	/**
256
	/**
232
	 * Must not assume that will only be called from the UI thread.
257
	 * Must not assume that will only be called from the UI thread.
Lines 237-242 Link Here
237
		removeTerminatedLaunches(launch);
262
		removeTerminatedLaunches(launch);
238
	}
263
	}
239
	
264
	
265
	/**
266
	 * Removes terminated launches from the launch view, leaving the specified launch in the view
267
	 * @param newLaunch the newly added launch to leave in the view
268
	 */
240
	protected void removeTerminatedLaunches(ILaunch newLaunch) {
269
	protected void removeTerminatedLaunches(ILaunch newLaunch) {
241
	    if (DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES)) {
270
	    if (DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES)) {
242
	        ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
271
	        ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchDelegatesDialog.java (+21 lines)
Lines 16-29 Link Here
16
import org.eclipse.jface.viewers.ICheckStateListener;
16
import org.eclipse.jface.viewers.ICheckStateListener;
17
import org.eclipse.jface.viewers.ILabelProvider;
17
import org.eclipse.jface.viewers.ILabelProvider;
18
import org.eclipse.jface.viewers.ILabelProviderListener;
18
import org.eclipse.jface.viewers.ILabelProviderListener;
19
import org.eclipse.jface.viewers.ISelectionChangedListener;
20
import org.eclipse.jface.viewers.IStructuredSelection;
21
import org.eclipse.jface.viewers.SelectionChangedEvent;
19
import org.eclipse.swt.SWT;
22
import org.eclipse.swt.SWT;
20
import org.eclipse.swt.graphics.Image;
23
import org.eclipse.swt.graphics.Image;
21
import org.eclipse.swt.graphics.Point;
24
import org.eclipse.swt.graphics.Point;
22
import org.eclipse.swt.layout.GridData;
25
import org.eclipse.swt.layout.GridData;
23
import org.eclipse.swt.widgets.Composite;
26
import org.eclipse.swt.widgets.Composite;
24
import org.eclipse.swt.widgets.Control;
27
import org.eclipse.swt.widgets.Control;
28
import org.eclipse.swt.widgets.Group;
25
import org.eclipse.swt.widgets.Shell;
29
import org.eclipse.swt.widgets.Shell;
26
import org.eclipse.swt.widgets.Table;
30
import org.eclipse.swt.widgets.Table;
31
import org.eclipse.swt.widgets.Text;
27
import org.eclipse.ui.PlatformUI;
32
import org.eclipse.ui.PlatformUI;
28
import org.eclipse.ui.dialogs.SelectionDialog;
33
import org.eclipse.ui.dialogs.SelectionDialog;
29
34
Lines 66-71 Link Here
66
	private CheckboxTableViewer fTableViewer = null;
71
	private CheckboxTableViewer fTableViewer = null;
67
	private Table fTable  = null;
72
	private Table fTable  = null;
68
	private ILaunchDelegate[] fDelegates = null;
73
	private ILaunchDelegate[] fDelegates = null;
74
	private Text fDescriptionText = null;
75
	private final String EMPTY_STRING = ""; //$NON-NLS-1$
69
	
76
	
70
	/**
77
	/**
71
	 * Constructor
78
	 * Constructor
Lines 102-107 Link Here
102
				getButton(IDialogConstants.OK_ID).setEnabled(true);
109
				getButton(IDialogConstants.OK_ID).setEnabled(true);
103
			}
110
			}
104
		});
111
		});
112
		fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
113
			public void selectionChanged(SelectionChangedEvent event) {
114
				IStructuredSelection ss = (IStructuredSelection) event.getSelection();
115
				if(ss != null && !ss.isEmpty()) {
116
					fDescriptionText.setText(((ILaunchDelegate)ss.getFirstElement()).getDescription());
117
				}
118
				else {
119
					fDescriptionText.setText(EMPTY_STRING);
120
				}
121
			}
122
		});
123
		Group group = SWTUtil.createGroup(comp, LaunchConfigurationsMessages.SelectLaunchDelegatesDialog_3, 1, 1, GridData.FILL_BOTH);
124
		fDescriptionText = SWTUtil.createText(group, SWT.WRAP | SWT.READ_ONLY, 1, GridData.FILL_BOTH);
125
		fDescriptionText.setBackground(group.getBackground());
105
		Dialog.applyDialogFont(comp);		
126
		Dialog.applyDialogFont(comp);		
106
		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.SELECT_LAUNCH_DELEGATES_DIALOG);
127
		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.SELECT_LAUNCH_DELEGATES_DIALOG);
107
		return comp;
128
		return comp;
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java (-3 / +71 lines)
Lines 13-18 Link Here
13
 
13
 
14
import java.util.ArrayList;
14
import java.util.ArrayList;
15
import java.util.Collections;
15
import java.util.Collections;
16
import java.util.HashSet;
16
import java.util.Hashtable;
17
import java.util.Hashtable;
17
import java.util.Iterator;
18
import java.util.Iterator;
18
import java.util.List;
19
import java.util.List;
Lines 26-32 Link Here
26
import org.eclipse.core.runtime.Platform;
27
import org.eclipse.core.runtime.Platform;
27
import org.eclipse.core.runtime.Status;
28
import org.eclipse.core.runtime.Status;
28
import org.eclipse.debug.core.DebugPlugin;
29
import org.eclipse.debug.core.DebugPlugin;
30
import org.eclipse.debug.core.ILaunchConfiguration;
29
import org.eclipse.debug.core.ILaunchConfigurationType;
31
import org.eclipse.debug.core.ILaunchConfigurationType;
32
import org.eclipse.debug.core.ILaunchDelegate;
30
import org.eclipse.debug.core.ILaunchManager;
33
import org.eclipse.debug.core.ILaunchManager;
31
import org.eclipse.debug.core.ILaunchMode;
34
import org.eclipse.debug.core.ILaunchMode;
32
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
35
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
Lines 34-39 Link Here
34
import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
37
import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
35
import org.eclipse.debug.ui.IDebugUIConstants;
38
import org.eclipse.debug.ui.IDebugUIConstants;
36
import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
39
import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
40
import org.eclipse.ui.PlatformUI;
41
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
42
import org.eclipse.ui.activities.WorkbenchActivityHelper;
37
43
38
import com.ibm.icu.text.MessageFormat;
44
import com.ibm.icu.text.MessageFormat;
39
45
Lines 165-191 Link Here
165
			 MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_No_tab_group_defined_for_launch_configuration_type__0__3, (new String[] {type.getIdentifier()})), null);  
171
			 MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_No_tab_group_defined_for_launch_configuration_type__0__3, (new String[] {type.getIdentifier()})), null);  
166
			 throw new CoreException(status);
172
			 throw new CoreException(status);
167
		} 
173
		} 
168
		return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier());		
174
		return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), null);		
175
	}
176
	
177
	/**
178
	 * Returns the tab group for the given launch configutation, its type and the mode the dialog opened in
179
	 * @param type the type of the configuration
180
	 * @param config
181
	 * @param mode
182
	 * @return
183
	 * @throws CoreException
184
	 */
185
	public ILaunchConfigurationTabGroup getTabGroup(ILaunchConfiguration config, String mode) throws CoreException {
186
		LaunchConfigurationTabGroupExtension ext = getExtension(config.getType().getIdentifier(), mode);
187
		if (ext == null) {
188
			IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR,
189
			 MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_No_tab_group_defined_for_launch_configuration_type__0__3, (new String[] {config.getType().getIdentifier()})), null);  
190
			 throw new CoreException(status);
191
		} 
192
		return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), config);
169
	}
193
	}
170
	
194
	
171
	/**
195
	/**
172
	 * Returns the proxy elements for all contributed tabs for the specified tab group id
196
	 * Returns the proxy elements for all contributed tabs for the specified tab group id
173
	 * @param groupid the id of the tab group
197
	 * @param groupid the id of the tab group
198
	 * @param type the type the tab group is opened on
199
	 * @param mode the mode the associated launch dialog is opened on
174
	 * @return the listing of all of the tab extensions or an empty array, never <code>null</code>
200
	 * @return the listing of all of the tab extensions or an empty array, never <code>null</code>
175
	 * 
201
	 * 
176
	 * @since 3.3
202
	 * @since 3.3
177
	 * 
203
	 * 
178
	 * EXPERIMENTAL
204
	 * EXPERIMENTAL
179
	 */
205
	 */
180
	protected LaunchConfigurationTabExtension[] getTabExtensions(String groupid) {
206
	protected LaunchConfigurationTabExtension[] getTabExtensions(String groupid, ILaunchConfiguration config, String mode) throws CoreException {
181
		Hashtable tabs = (Hashtable) fContributedTabs.get(groupid);
207
		Hashtable tabs = (Hashtable) fContributedTabs.get(groupid);
182
		if(tabs != null) {
208
		if(tabs != null) {
183
			return (LaunchConfigurationTabExtension[]) tabs.values().toArray(new LaunchConfigurationTabExtension[tabs.size()]);
209
			return filterLaunchTabExtensions((LaunchConfigurationTabExtension[]) tabs.values().toArray(new LaunchConfigurationTabExtension[tabs.size()]), config, mode);
184
		}
210
		}
185
		return new LaunchConfigurationTabExtension[0];
211
		return new LaunchConfigurationTabExtension[0];
186
	}
212
	}
187
	
213
	
188
	/**
214
	/**
215
	 * Returns a listing of <code>LaunchConfiguraitonTabExtension</code>s that does not contain any tabs
216
	 * from disabled activities
217
	 * @param tabs the raw listing of tabs to filter
218
	 * @return the listing of filtered <code>LaunchConfigurationTabExtension</code>s or an empty array, never <code>null</code>
219
	 * 
220
	 * @since 3.3
221
	 * 
222
	 * EXPERIMENTAL
223
	 */
224
	protected LaunchConfigurationTabExtension[] filterLaunchTabExtensions(LaunchConfigurationTabExtension[] tabs, ILaunchConfiguration config, String mode) throws CoreException {
225
		IWorkbenchActivitySupport as = PlatformUI.getWorkbench().getActivitySupport();
226
		if(as == null || config == null) {
227
			return tabs;
228
		}
229
		HashSet set = new HashSet();
230
		for(int i = 0; i < tabs.length; i ++) {
231
		//filter capabilities
232
			if(!WorkbenchActivityHelper.filterItem(new LaunchTabContribution(tabs[i]))) {
233
			//filter to preferred delegate (if there is one)
234
				HashSet modes = (HashSet) config.getModes();
235
				modes.add(mode);
236
				ILaunchDelegate delegate = config.getType().getPreferredDelegate(modes);
237
				if(delegate != null) {
238
					if(tabs[i].getDelegateSet().contains(delegate.getId())) {
239
						set.add(tabs[i]);
240
					}
241
				}
242
				else {
243
					//otherwise filter based on the collection of delegates for the modes
244
					ILaunchDelegate[] delegates = config.getType().getDelegates(modes);
245
					for(int j = 0; j < delegates.length; j++) {
246
						if(tabs[i].getDelegateSet().contains(delegates[j].getId())) {
247
							set.add(tabs[i]);
248
						}
249
					}
250
				}
251
			}
252
		}
253
		return (LaunchConfigurationTabExtension[]) set.toArray(new LaunchConfigurationTabExtension[set.size()]);
254
	}
255
	
256
	/**
189
	 * Returns the launch tab group extension for the given type and mode, or
257
	 * Returns the launch tab group extension for the given type and mode, or
190
	 * <code>null</code> if none
258
	 * <code>null</code> if none
191
	 * 
259
	 * 
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java (-1 / +1 lines)
Lines 66-72 Link Here
66
			}
66
			}
67
			try {
67
			try {
68
				ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2)); 
68
				ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2)); 
69
				ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc.getType(), getMode());
69
				ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode());
70
				// this only works because this action is only present when the dialog is open
70
				// this only works because this action is only present when the dialog is open
71
				ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
71
				ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
72
				tabGroup.createTabs(dialog, dialog.getMode());
72
				tabGroup.createTabs(dialog, dialog.getMode());
(-)schema/launchConfigurationTabs.exsd (-2 / +20 lines)
Lines 38-45 Link Here
38
         </documentation>
38
         </documentation>
39
      </annotation>
39
      </annotation>
40
      <complexType>
40
      <complexType>
41
         <sequence minOccurs="0" maxOccurs="1">
41
         <sequence>
42
            <element ref="placement"/>
42
            <element ref="placement" minOccurs="0" maxOccurs="1"/>
43
            <element ref="associatedDelegate" minOccurs="0" maxOccurs="unbounded"/>
43
         </sequence>
44
         </sequence>
44
         <attribute name="id" type="string" use="required">
45
         <attribute name="id" type="string" use="required">
45
            <annotation>
46
            <annotation>
Lines 92-97 Link Here
92
      </complexType>
93
      </complexType>
93
   </element>
94
   </element>
94
95
96
   <element name="associatedDelegate">
97
      <annotation>
98
         <documentation>
99
            This attribute is used to map a contrinbuted tab to one or more launch delegates. This allows tabs to be filtered from the launch dialog based on what launch delegate/tooling is selected as the current default.
100
         </documentation>
101
      </annotation>
102
      <complexType>
103
         <attribute name="delegate" type="string" use="required">
104
            <annotation>
105
               <documentation>
106
                  The id of the &lt;code&gt;launchDelegate&lt;/code&gt; that this tab is associated with. The association allows the tab to be filtered based on the modesets supported by the delegates. since 3.3 EXPERIMENTAL
107
               </documentation>
108
            </annotation>
109
         </attribute>
110
      </complexType>
111
   </element>
112
95
   <annotation>
113
   <annotation>
96
      <appInfo>
114
      <appInfo>
97
         <meta.section type="since"/>
115
         <meta.section type="since"/>
(-)ui/org/eclipse/debug/ui/AbstractLaunchModeConfigurationTab.java (-90 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.ui;
12
13
import java.util.Set;
14
15
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.debug.core.DebugPlugin;
17
import org.eclipse.debug.core.ILaunchConfiguration;
18
import org.eclipse.debug.core.ILaunchConfigurationListener;
19
import org.eclipse.debug.internal.ui.DebugUIPlugin;
20
import org.eclipse.swt.widgets.Composite;
21
22
/**
23
 * Common function for a launch tab that edits a launch mode. 
24
 * <p>
25
 * This class is intended to be subclassed by clients contributing launch tabs
26
 * that modify launch modes on a launch configuration.
27
 * </p>
28
 * @since 3.3
29
 * 
30
 * <p>
31
 * <strong>EXPERIMENTAL</strong>. This class has been added as
32
 * part of a work in progress. There is no guarantee that this API will
33
 * remain unchanged during the 3.3 release cycle. Please do not use this API
34
 * without consulting with the Platform/Debug team.
35
 * </p>
36
 */
37
public abstract class AbstractLaunchModeConfigurationTab extends AbstractLaunchConfigurationTab implements ILaunchConfigurationListener {
38
	
39
	/**
40
	 * Returns the set of the modes this tab modifies.
41
	 * 
42
	 * @return set of the modes this tab modifies
43
	 */
44
	public abstract Set getModes();
45
	
46
	/**
47
	 * Updates the controls associated with this tab's launch modes.
48
	 * Called when a launch configuration has changed, which can occur when a tab 
49
	 * is de-activated. Launch modes may have been modified outside of this tab's control.
50
	 * 
51
	 * @param modes the current set of modes specified by the working copy being edited
52
	 */
53
	public abstract void updateLaunchModeControls(Set modes);
54
	
55
	/**
56
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
57
	 */
58
	public void createControl(Composite parent) {
59
		DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this);
60
	}
61
	
62
	/**
63
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
64
	 */
65
	public void dispose() {
66
		DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this);
67
		super.dispose();
68
	}
69
70
	/**
71
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
72
	 */
73
	public void launchConfigurationAdded(ILaunchConfiguration configuration) {}
74
75
	/**
76
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
77
	 */
78
	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
79
	
80
	/**
81
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
82
	 */
83
	public void launchConfigurationChanged(ILaunchConfiguration configuration) {
84
		try {
85
			updateLaunchModeControls(configuration.getModes());
86
		} 
87
		catch (CoreException e) {DebugUIPlugin.log(e);}
88
	}
89
90
}
(-)ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java (+3 lines)
Lines 54-59 Link Here
54
		((GridData)text.getLayoutData()).horizontalIndent = 10;
54
		((GridData)text.getLayoutData()).horizontalIndent = 10;
55
		PlatformUI.getWorkbench().getHelpSystem().setHelp(text, IDebugHelpContextIds.PROCESS_PAGE_RUN_AT);
55
		PlatformUI.getWorkbench().getHelpSystem().setHelp(text, IDebugHelpContextIds.PROCESS_PAGE_RUN_AT);
56
		text.setText(getTimeText(proc));
56
		text.setText(getTimeText(proc));
57
		text.setBackground(parent.getBackground());
57
		SWTUtil.createVerticalSpacer(parent, 2);
58
		SWTUtil.createVerticalSpacer(parent, 2);
58
		
59
		
59
	//create the path name section
60
	//create the path name section
Lines 61-66 Link Here
61
		text = SWTUtil.createText(parent, SWT.WRAP | SWT.READ_ONLY, 1);
62
		text = SWTUtil.createText(parent, SWT.WRAP | SWT.READ_ONLY, 1);
62
		((GridData)text.getLayoutData()).horizontalIndent = 10;
63
		((GridData)text.getLayoutData()).horizontalIndent = 10;
63
		text.setText(getPathText(proc));
64
		text.setText(getPathText(proc));
65
		text.setBackground(parent.getBackground());
64
		SWTUtil.createVerticalSpacer(parent, 2);
66
		SWTUtil.createVerticalSpacer(parent, 2);
65
		
67
		
66
	//create commandline section
68
	//create commandline section
Lines 71-76 Link Here
71
				convertWidthInCharsToPixels(80),
73
				convertWidthInCharsToPixels(80),
72
				convertHeightInCharsToPixels(15),
74
				convertHeightInCharsToPixels(15),
73
				GridData.FILL_BOTH);
75
				GridData.FILL_BOTH);
76
		text.setBackground(parent.getBackground());
74
		((GridData)text.getLayoutData()).horizontalIndent = 10;
77
		((GridData)text.getLayoutData()).horizontalIndent = 10;
75
		String commandLineText = getCommandLineText(proc);
78
		String commandLineText = getCommandLineText(proc);
76
		if (commandLineText != null) {
79
		if (commandLineText != null) {
(-)ui/org/eclipse/debug/ui/AbstractLaunchConfigurationListenerTab.java (+69 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.ui;
12
13
import java.util.Set;
14
15
import org.eclipse.debug.core.DebugPlugin;
16
import org.eclipse.debug.core.ILaunchConfiguration;
17
import org.eclipse.debug.core.ILaunchConfigurationListener;
18
import org.eclipse.swt.widgets.Composite;
19
20
/**
21
 * Common function for a launch tab that edits a launch mode. 
22
 * <p>
23
 * This class is intended to be subclassed by clients contributing launch tabs
24
 * that modify launch modes on a launch configuration.
25
 * </p>
26
 * @since 3.3
27
 * 
28
 * <p>
29
 * <strong>EXPERIMENTAL</strong>. This class has been added as
30
 * part of a work in progress. There is no guarantee that this API will
31
 * remain unchanged during the 3.3 release cycle. Please do not use this API
32
 * without consulting with the Platform/Debug team.
33
 * </p>
34
 */
35
public abstract class AbstractLaunchConfigurationListenerTab extends AbstractLaunchConfigurationTab implements ILaunchConfigurationListener {
36
	
37
	/**
38
	 * Returns the set of the modes this tab modifies.
39
	 * 
40
	 * @return set of the modes this tab modifies
41
	 */
42
	public abstract Set getModes();
43
	
44
	/**
45
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
46
	 */
47
	public void createControl(Composite parent) {
48
		DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this);
49
	}
50
	
51
	/**
52
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
53
	 */
54
	public void dispose() {
55
		DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this);
56
		super.dispose();
57
	}
58
59
	/**
60
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
61
	 */
62
	public void launchConfigurationAdded(ILaunchConfiguration configuration) {}
63
64
	/**
65
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
66
	 */
67
	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
68
69
}
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateContribution.java (+48 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.launchConfigurations;
12
13
import org.eclipse.debug.core.ILaunchDelegate;
14
import org.eclipse.ui.IPluginContribution;
15
16
/**
17
 * This class provides a wrapper for a launch delegate so tht it can be filtered from UI and launching choices
18
 * @since 3.3
19
 * 
20
 * EXPERIMENTAL
21
 */
22
public class LaunchDelegateContribution implements IPluginContribution {
23
24
	private ILaunchDelegate fDelegate = null;
25
	
26
	/**
27
	 * Constructor
28
	 * @param delegate
29
	 */
30
	public LaunchDelegateContribution(ILaunchDelegate delegate) {
31
		fDelegate = delegate;
32
	}
33
	
34
	/**
35
	 * @see org.eclipse.ui.IPluginContribution#getLocalId()
36
	 */
37
	public String getLocalId() {
38
		return fDelegate.getId();
39
	}
40
41
	/**
42
	 * @see org.eclipse.ui.IPluginContribution#getPluginId()
43
	 */
44
	public String getPluginId() {
45
		return fDelegate.getPluginIdentifier();
46
	}
47
48
}
(-)ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchTabContribution.java (+46 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.launchConfigurations;
12
13
import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
14
import org.eclipse.ui.IPluginContribution;
15
16
/**
17
 * This class provides a wrapper for a launch tab contribution so that it can be filtered from the UI 
18
 * via the use of capabilities
19
 * 
20
 * @since 3.3
21
 * 
22
 * EXPERIMENTAL
23
 */
24
public class LaunchTabContribution implements IPluginContribution {
25
26
	LaunchConfigurationTabExtension fTab = null;
27
	
28
	public LaunchTabContribution(LaunchConfigurationTabExtension tab) {
29
		fTab = tab;
30
	}
31
32
	/**
33
	 * @see org.eclipse.ui.IPluginContribution#getLocalId()
34
	 */
35
	public String getLocalId() {
36
		return fTab.getIdentifier();
37
	}
38
39
	/**
40
	 * @see org.eclipse.ui.IPluginContribution#getPluginId()
41
	 */
42
	public String getPluginId() {
43
		return fTab.getPluginIdentifier();
44
	}
45
46
}

Return to bug 157059