Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-10-23 16:12:17 +0000
committerDarin Wright2006-10-23 16:12:17 +0000
commit395806ca87607c60abf439b5fd9824d509e460aa (patch)
treee261e78d1bedd4185b5cf5d01e2e78684a86615e
parent0ec684e7d594b913bc4b29f78990efe6771cc0f5 (diff)
downloadeclipse.platform.debug-395806ca87607c60abf439b5fd9824d509e460aa.tar.gz
eclipse.platform.debug-395806ca87607c60abf439b5fd9824d509e460aa.tar.xz
eclipse.platform.debug-395806ca87607c60abf439b5fd9824d509e460aa.zip
merge with HEAD
-rw-r--r--org.eclipse.debug.core/buildnotes_platform-debug.html67
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java10
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java7
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IConfigurationElementConstants.java10
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java30
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java21
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java30
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchDelegate.java36
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java20
-rw-r--r--org.eclipse.debug.core/schema/launchDelegates.exsd3
-rw-r--r--org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java31
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java94
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypesViewer.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties9
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java42
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchOptionsDialog.java164
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/PerspectivePreferencePage.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerDialog.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsSorter.java132
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java17
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java9
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java16
39 files changed, 349 insertions, 532 deletions
diff --git a/org.eclipse.debug.core/buildnotes_platform-debug.html b/org.eclipse.debug.core/buildnotes_platform-debug.html
index 7dacd791e..54cdd8121 100644
--- a/org.eclipse.debug.core/buildnotes_platform-debug.html
+++ b/org.eclipse.debug.core/buildnotes_platform-debug.html
@@ -21,40 +21,65 @@
<li>deprecated <code>IDebugUIConstants.ATTR_CONSOLE_ENCODING</code>.</li>
<li>added <code>DebugUITools.getLastLaunch(String id)</code> - provides access
to the last launch in each launch group.</li>
+ <li>added <code>ILaunchConfiguration.isReadOnly()</code> - returns whether a configuration
+ is read-only in the file system. The debug UI disables editing of read-only configurations.</li>
</ul>
-<h2>Summary of Launch Option conversion/changes in 3.3</h2>
+<h2>Summary of Extensible Launch Option conversion/changes in 3.3</h2>
<ul>
- <li>Added <code>launchOptions</code> schema -- provides a mechanism for contributing
- launch options</li>
- <li>Added interface<code>ILaunchOption</code> -- describes a contributed launch
- option</li>
- <li>Added method <code>ILaunchManager.getLaunchOptions()</code> -- returns all
- of the <code>contributed ILaunchOptions</code> </li>
- <li>Added method <code>ILaunchManager.getLaunchOption(String id)</code> -- returns
- the <code>ILaunchOption</code> associated with the given unique id, or <code>null</code></li>
- <li>Added method <code>ILaunchConfiguration.getOptions()</code> -- returns a
- configuration's launch options</li>
- <li>Added method <code>ILaunchConfigurationWorkingCopy.setOptions(String[] options)</code>
- -- sets a configuration's options</li>
<li>Added method <code>ILaunchConfigurationType.getContributorName()</code>
-- returns the name of the contributing plug-in </li>
<li>Added method <code>ILaunchConfigurationType.getImageDescriptorPath()</code>
-- returns path of the image or <code>null</code></li>
- <li>Added method <code>ILaunchConfigurationType.getDelegate(String mode, Set
- options)</code> -- returns the launch delegate for the specified mode and
- options</li>
- <li>Deprecated method <code>ILaunchConfigurationType.getDelegate(String mode)</code>
- -- in favour of the new <code>getDelegate(String mode, String[] options) method</code></li>
<li>Added attrbute 'icon' in <code>launchConfigurationTypes</code> schema, in
favour of contributing a seperate extension <code>launchConfigurationTypeImages</code></li>
+ <li>Added tab id filed to <code>AbstractLaunchConfigurationTab</code> class</li>
+ <li>Provided tab ids for all debug provided tabs</li>
+ <li>Added method openLaunchConfigurationEditDialog -- opens the launch configuration dialog on a configuration to be
+ edited and launching can be continued</li>
+ <li>Added getAttribute() to <code>ILaunchConfiguration</code>, which returns a <code>java.util.Set</code></li>
+ <li>Added a new subclass of <code>LaunchConfigurationsDialog</code>, <code>LaunchConfigurationEditDialog</code> which allows
+ a configuration to be edited on the fly with a continue button.</li>
+ <li>Added method getSetAttribute to <code>LaunchConfigurationInfo</code></li>
+ <li>Added method getTabExtensions which returns the list of launchConfigurationTab extension proxies.</li>
+ <li>Added method getRelativeTabId to <code>LaunchConfigurationTabExtension</code> -- returns the id of the tab
+ that this tab should lbe placed relative to i.e.immediately after.</li>
+ <li>Added a select options <code>Link</code> to <code>LaunchConfiguraitonTabGroupViewer</code>, which is used to resolve problems</li>
+ with duplicate and unavailable launch delegates</li>
+ <li>Added new status handler <code>LaunchDelegateNotAvailabaleHandler</code>, which prompts a user to select a differnet launch delegate
+ to resolve problems with the current one.</li>
+ <li>Added method getLaunchDelegates to <code>LaunchManager</code> -- returns all of the contributed launch delegates.</li>
+ <li>Added method getLaunchDelegates(String typeid) to <code>LaunchManager</code> -- returns the launch delegates
+ contributed for the specific launch configuration type id.</li>
+ <li>Added method initializeLaunchDelegates to <code>LaunchManager</code> -- initially creates the listing of contributed launch delegates</li>
+ <li>Added dialog class <code>SelectLaunchModesDialog</code> -- used to allow users to select a differing launch delegate in the event
+ there is a problem with the current one.</li>
+ <li>Added <code>LAUNCH_MODES</code> constant to <code>LaunchConfiguration</code></li>
+ <li>Added class <code>AbstractLaunchModeConfigurationTab</code> to provide some default implememtation for contributing a launch configuration
+ tab that provides a mode attribute.</li>
+ <li>Added class <code>LaunchConfigurationTabGroupWrapper</code> which provides a wrapper for a contributed launch group
+ and contributed tabs for that launch group.</li>
+ <li>Added constant <code>EXTENSION_POINT_LAUNCH_TABS</code> to <code>IDebugUIConstants</code> for finding contributed launch configuration
+ tabs.</li>
+ <li>Added interface <code>ILaunchDelegate</code> which provides API for access to a launch delegates extension point.</li>
<li>Added attribute 'name' to the <code>launchDelegates</code> schema, providing
a human readable name for the delegate. To be used in duplicate resolution</li>
- <li>Added attribute 'options' to the <code>launchDelegates</code> schema, providing
- the ability to specify launch options that this delegate can support</li>
- <li>Added constant <code>EXTENSION_POINT_CONTRIBUTED_LAUNCH_TABS</code> to <code>IDebugUIConstants</code></li>
+ <li>Added method getModes to <code>ILaunchConfiguration</code> -- returns the set of modes that have been set on the launch configuration.</li>
+ <li>Added method getDelegates(Set) to <code>ILaunchConfigurationType</code> to return an array of <code>ILaunchDelegate</code> instances for the
+ associated type.</li>
</ul>
+<h2>Oct 24, 2006</h2>
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=161896">161896</a>: Warnings in N20061022-0010<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=151848">151848</a>: [launching] Write protected launch configurations fails in Launch Configuration Dialog<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=153789">153789</a>: [launching] Launch configuration dialog: switching filters should not remove multiselection<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154400">154400</a>: [WorkingSets] Select Default Breakpoint Working Set dialog is confusing and can clear default setting accidentally<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=157915">157915</a>: Delete launch configurations confirmation dialog too small<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=158232">158232</a>: 'Terminate and relaunch' action is enabled for non-relaunchable configs<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=161077">161077</a>: [schema] build N20061016-0010 schema errors<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=161080">161080</a>: [schema] build &gt; N20061016-0010 schema errors<br>
+
<h2>Oct 3, 2006</h2>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=158760">158760</a>: Warning in latest nightly build and integration build<br>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java
index 5590f7999..02be939cc 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java
@@ -545,4 +545,14 @@ public interface ILaunchConfiguration extends IAdaptable {
* </ul>
*/
public boolean supportsMode(String mode) throws CoreException;
+
+ /**
+ * Returns whether this launch configuration is read-only.
+ * A read-only configuration cannot be modified.
+ *
+ * @return whether this configuration is read-only
+ *
+ * @since 3.3
+ */
+ public boolean isReadOnly();
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java
index 92df3b660..3e0738495 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java
@@ -133,10 +133,10 @@ public interface ILaunchConfigurationType extends IAdaptable {
public ILaunchConfigurationDelegate getDelegate(String mode) throws CoreException;
/**
- * Returns the launch delegates capable of launching in the specified modes.
+ * Returns the delegates capable of launching in the specified modes.
*
* @param modes set of launch modes
- * @return the <code>ILaunchConfigurationDelegate</code>s capable of launching
+ * @return the <code>ILaunchDelegateProxy</code>s capable of launching
* in the specified modes or an empty collection if none
* @throws CoreException
* @since 3.3
@@ -148,7 +148,7 @@ public interface ILaunchConfigurationType extends IAdaptable {
* without consulting with the Platform/Debug team.
* </p>
*/
- public ILaunchConfigurationDelegate[] getDelegates(Set modes) throws CoreException;
+ public ILaunchDelegateProxy[] getDelegates(Set modes) throws CoreException;
/**
* Returns a collection of all supported launch mode combinations for
@@ -312,4 +312,5 @@ public interface ILaunchConfigurationType extends IAdaptable {
* </p>
*/
public String getImageDescriptorPath();
+
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IConfigurationElementConstants.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IConfigurationElementConstants.java
index f7aca3889..bf229e1bc 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IConfigurationElementConstants.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IConfigurationElementConstants.java
@@ -37,6 +37,16 @@ public interface IConfigurationElementConstants {
public static final String LAUNCH_MODE = "launchMode"; //$NON-NLS-1$
/**
+ * the after node name for a configuration element
+ */
+ public static final String AFTER = "after"; //$NON-NLS-1$
+
+ /**
+ * the placement node name for a configuration element
+ */
+ public static final String PLACEMENT = "placement"; //$NON-NLS-1$
+
+ /**
* the label node name for a configuration element
*/
public static final String LABEL = "label"; //$NON-NLS-1$
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
index 9a8794336..c4fc10a76 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.core;
+import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
@@ -45,6 +46,8 @@ import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchDelegateProxy;
+import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.Launch;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate2;
@@ -600,13 +603,13 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
// bug 28245 - force the delegate to load in case it is interested in launch notifications
Set modes = getModes();
modes.add(mode);
- ILaunchConfigurationDelegate[] delegates = getType().getDelegates(modes);
+ ILaunchDelegateProxy[] delegates = getType().getDelegates(modes);
ILaunchConfigurationDelegate delegate = null;
if (delegates.length == 1) {
- delegate = delegates[0];
+ delegate = delegates[0].getDelegate();
} else if (delegates.length == 0) {
- //IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(promptStatus);
- //handler.handleStatus(delegateNotAvailable, new Object[] {this, mode});
+ IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(promptStatus);
+ handler.handleStatus(delegateNotAvailable, new Object[] {this, mode});
// no delegates TODO:
IStatus status = new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
DebugPlugin.INTERNAL_ERROR, "No launch delegate", null); //$NON-NLS-1$
@@ -736,6 +739,25 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
public boolean supportsMode(String mode) throws CoreException {
return getType().supportsMode(mode);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchConfiguration#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ if(!isLocal()) {
+ IFile file = getFile();
+ if(file != null) {
+ return file.isReadOnly();
+ }
+ }
+ else {
+ File file = getLocation().toFile();
+ if(file != null) {
+ return file.exists() && !file.canWrite();
+ }
+ }
+ return false;
+ }
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java
index e425c3dba..4b2faf223 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java
@@ -31,6 +31,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchDelegateProxy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.ILaunchMode;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
@@ -128,9 +129,9 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
public ILaunchConfigurationDelegate getDelegate(String mode) throws CoreException {
Set modes = new HashSet();
modes.add(mode);
- ILaunchConfigurationDelegate[] delegates = getDelegates(modes);
+ ILaunchDelegateProxy[] delegates = getDelegates(modes);
if (delegates.length > 0) {
- return delegates[0];
+ return delegates[0].getDelegate();
}
IStatus status = null;
ILaunchMode launchMode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(mode);
@@ -146,7 +147,7 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
throw new CoreException(status);
}
- public ILaunchConfigurationDelegate[] getDelegates(Set modes) throws CoreException {
+ public ILaunchDelegateProxy[] getDelegates(Set modes) throws CoreException {
initializeDelegates();
Object[] theModes = modes.toArray();
for (int i = 0; i < theModes.length; i++) {
@@ -160,11 +161,7 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
if (delegates == null) {
delegates = Collections.EMPTY_LIST;
}
- ILaunchConfigurationDelegate[] result = new ILaunchConfigurationDelegate[delegates.size()];
- for (int i = 0; i < result.length; i++) {
- result[i] = ((LaunchDelegate)delegates.get(i)).getDelegate();
- }
- return result;
+ return (ILaunchDelegateProxy[]) delegates.toArray(new ILaunchDelegateProxy[delegates.size()]);
}
private synchronized void initializeDelegates() {
@@ -394,7 +391,12 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
public Set[] getSupportedModeCombinations() {
initializeDelegates();
Set combinations = fDelegates.keySet();
- return (Set[])combinations.toArray(new Set[combinations.size()]);
+ Set[] sets = (Set[])combinations.toArray(new Set[combinations.size()]);
+ Set[] copy = new Set[sets.length];
+ for (int i = 0; i < copy.length; i++) {
+ copy[i] = new HashSet(sets[i]);
+ }
+ return copy;
}
/* (non-Javadoc)
@@ -404,5 +406,6 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
initializeDelegates();
return fDelegates.containsKey(modes);
}
+
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
index 3ce3a3ad7..1542abef1 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
@@ -198,25 +198,6 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
writeNewFile();
fDirty = false;
}
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationWorkingCopy#isReadOnly()
- */
- public boolean isReadOnly() {
- if(!isLocal()) {
- IFile file = getFile();
- if(file != null) {
- return file.isReadOnly();
- }
- }
- else {
- File file = getLocation().toFile();
- if(file != null) {
- return file.exists() && !file.canWrite();
- }
- }
- return false;
- }
/**
* Writes the new configuration information to a file.
@@ -424,11 +405,17 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
}
}
+ /**
+ * @see org.eclipse.debug.core.ILaunchConfigurationWorkingCopy#setModes(java.util.Set)
+ */
public void setModes(Set options) {
getInfo().setAttribute(ATTR_LAUNCH_MODES, (options.size() > 0 ? options : null));
setDirty();
}
+ /**
+ * @see org.eclipse.debug.core.ILaunchConfigurationWorkingCopy#addModes(java.util.Set)
+ */
public void addModes(Set options) {
try {
Set opts = getModes();
@@ -442,11 +429,14 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
}
}
+ /**
+ * @see org.eclipse.debug.core.ILaunchConfigurationWorkingCopy#removeModes(java.util.Set)
+ */
public void removeModes(Set options) {
try {
Set opts = getModes();
if(opts.removeAll(options)) {
- getInfo().setAttribute(ATTR_LAUNCH_MODES, opts);
+ getInfo().setAttribute(ATTR_LAUNCH_MODES, (opts.size() < 1 ? null : opts));
setDirty();
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchDelegate.java
index 0e2907813..46f8ba28f 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchDelegate.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchDelegate.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchDelegateProxy;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import com.ibm.icu.text.MessageFormat;
@@ -46,7 +47,7 @@ import com.ibm.icu.text.MessageFormat;
*
* @since 3.3
*/
-public final class LaunchDelegate {
+public final class LaunchDelegate implements ILaunchDelegateProxy {
/**
* The configuration element for this delegate
@@ -71,26 +72,19 @@ public final class LaunchDelegate {
fElement = element;
}
- /**
- * Returns the actual instance of the launch delegate specified
- * @return the launch delegate
- */
public ILaunchConfigurationDelegate getDelegate() throws CoreException {
if(fDelegate == null) {
Object obj = fElement.createExecutableExtension(IConfigurationElementConstants.DELEGATE);
if(obj instanceof ILaunchConfigurationDelegate) {
fDelegate = (ILaunchConfigurationDelegate)obj;
} else {
- throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugPlugin.INTERNAL_ERROR, MessageFormat.format(DebugCoreMessages.LaunchConfigurationType_Launch_delegate_for__0__does_not_implement_required_interface_ILaunchConfigurationDelegate__1, new String[]{getIdentifier()}), null));
+ throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugPlugin.INTERNAL_ERROR, MessageFormat.format(DebugCoreMessages.LaunchConfigurationType_Launch_delegate_for__0__does_not_implement_required_interface_ILaunchConfigurationDelegate__1, new String[]{getId()}), null));
}
}
return fDelegate;
}
- /**
- * @return returns the unique id of the delegate
- */
- public String getIdentifier() {
+ public String getId() {
return fElement.getAttribute(IConfigurationElementConstants.ID);
}
@@ -98,7 +92,7 @@ public final class LaunchDelegate {
* Returns the id of the associated <code>ILaunchConfigurationType</code> or <code>null</code> if none provided
* @return the id of the <code>ILaunchConfigurationType</code> associated with this delegate
*/
- public String getLaunchConfigurationType() {
+ public String getLaunchConfigurationTypeId() {
if(fType == null) {
//fall back to single association if no appliesTo
fType = fElement.getAttribute(IConfigurationElementConstants.TYPE);
@@ -110,11 +104,6 @@ public final class LaunchDelegate {
return fType;
}
- /**
- * Returns the set of options provided to by this delegate
- * @return the options associated with this delegate. If no options are specified an empty set is
- * returned, never <code>null</code>.
- */
public Set getOptions() {
if(fOptions == null) {
fOptions = new HashSet();
@@ -129,12 +118,6 @@ public final class LaunchDelegate {
return fOptions;
}
- /**
- * This method is provided as a backward compatibility measure to allow access to modes, if mode-based
- * launching is still being used.
- *
- * @return a set of modes for this delegate or the empty set if none are found, never <code>null</code>.
- */
public Set getModes() {
if (fModes == null) {
fModes = new HashSet();
@@ -158,6 +141,15 @@ public final class LaunchDelegate {
}
/**
+ * Returns the contributor name of this delegate (plug-in name).
+ *
+ * @return contributor name
+ */
+ public String getContributorName() {
+ return fElement.getContributor().getName();
+ }
+
+ /**
* Returns the associated source locator id or <code>null</code>
* @return the associated source locator id or <code>null</code> if not provided
*/
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index ec0733905..27cfc47e3 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -550,25 +550,13 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* Keys are mode identifiers, values are <code>ILaunchMode</code>s.
*/
private Map fLaunchModes = null;
-
- /**
- * Registered launch options, or <code>null</code> if not initialized
- * Map is of the form <code>Map<id, option></code>
- * @since 3.3
- */
- private HashMap fLaunchOptions = null;
-
+
/**
* A map of LaunchDelegate objects stored by id of delegate, or launch config type
*/
private HashMap fLaunchDelegates = null;
/**
- * A map of duplicate delegates arranged by config type id
- */
- private HashMap fDuplicateDelegates = null;
-
- /**
* Collection of launches
*/
private List fLaunches= new ArrayList(10);
@@ -1352,7 +1340,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
LaunchDelegate ld = null;
for(Iterator iter = fLaunchDelegates.keySet().iterator(); iter.hasNext();) {
ld = (LaunchDelegate) fLaunchDelegates.get(iter.next());
- if(ld.getLaunchConfigurationType().equals(typeid)) {
+ if(ld.getLaunchConfigurationTypeId().equals(typeid)) {
list.add(ld);
}
}
@@ -1379,7 +1367,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
LaunchDelegate delegate = null;
for(int i = 0; i < infos.length; i++) {
delegate = new LaunchDelegate(infos[i]);
- fLaunchDelegates.put(delegate.getIdentifier(), delegate);
+ fLaunchDelegates.put(delegate.getId(), delegate);
}
//get all delegates from launch configuration type contributions
extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.getUniqueIdentifier(), DebugPlugin.EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPES);
@@ -1388,7 +1376,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
//must check to see if delegate is provided in contribution
if(infos[i].getAttribute(IConfigurationElementConstants.DELEGATE) != null) {
delegate = new LaunchDelegate(infos[i]);
- fLaunchDelegates.put(delegate.getIdentifier(), delegate);
+ fLaunchDelegates.put(delegate.getId(), delegate);
}
}
}
diff --git a/org.eclipse.debug.core/schema/launchDelegates.exsd b/org.eclipse.debug.core/schema/launchDelegates.exsd
index 06f39c46d..dc1d00134 100644
--- a/org.eclipse.debug.core/schema/launchDelegates.exsd
+++ b/org.eclipse.debug.core/schema/launchDelegates.exsd
@@ -46,8 +46,6 @@
</appInfo>
</annotation>
<complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- </sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
@@ -159,7 +157,6 @@ without consulting with the Platform/Debug team.
&lt;/p&gt;
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.
-
</documentation>
</annotation>
diff --git a/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd b/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd
index 94f030609..35acd19f8 100644
--- a/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd
+++ b/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd
@@ -38,6 +38,9 @@ without consulting with the Platform/Debug team.&lt;/p&gt;
</documentation>
</annotation>
<complexType>
+ <sequence minOccurs="0" maxOccurs="1">
+ <element ref="placement"/>
+ </sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
@@ -72,6 +75,23 @@ without consulting with the Platform/Debug team.&lt;/p&gt;
</complexType>
</element>
+ <element name="placement">
+ <annotation>
+ <documentation>
+ This element allows contributors to specify relative locale for their contributed tab
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="after" type="string" use="required">
+ <annotation>
+ <documentation>
+ This attribute describes the id of the tab that this tab should appear immediately after in the left to right arrangement of tabs.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appInfo>
<meta.section type="since"/>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
index f84112dc8..7c4e554ec 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
@@ -78,5 +78,21 @@ public final class LaunchConfigurationTabExtension {
public String getTabGroupId() {
return fElement.getAttribute(IConfigurationElementConstants.GROUP);
}
+
+ /**
+ * This method returns the id of the tab that this tab should be placed immediately after.
+ * @return the id of the relative tab or <code>null</code> if one has not been specified
+ *
+ * @since 3.3
+ *
+ * EXPERIMENTAL
+ */
+ public String getRelativeTabId() {
+ IConfigurationElement[] elems = fElement.getChildren(IConfigurationElementConstants.PLACEMENT);
+ if(elems.length == 1) {
+ return elems[0].getAttribute(IConfigurationElementConstants.AFTER);
+ }
+ return null;
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
index 88eb6c424..17c2c0453 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
@@ -26,5 +26,5 @@ CopyBreakpointsAction_3=There was a problem when accessing the system clipboard.
PasteBreakpointsAction_0=&Paste
PasteBreakpointsAction_1=Paste Breakpoints
RemoveFromWorkingSetAction_0=Remove from &Working Set
-SetDefaultBreakpointGroupAction_0=Select Default Workingset
-SelectBreakpointWorkingsetDialog_0=Select &default workingset:
+SetDefaultBreakpointGroupAction_0=Select Default Working Set
+SelectBreakpointWorkingsetDialog_0=Select &default working set:
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
index 84a7498ff..2d045d633 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
@@ -12,10 +12,10 @@ package org.eclipse.debug.internal.ui.actions.breakpointGroups;
import java.util.Iterator;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
index 58cfc1013..9d11b5b21 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
@@ -14,17 +14,17 @@ package org.eclipse.debug.internal.ui.importexport.breakpoints;
import java.util.ArrayList;
import java.util.Vector;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsContentProvider;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsLabelProvider;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsSorter;
+import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsComparator;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ICheckStateListener;
@@ -134,7 +134,7 @@ public class EmbeddedBreakpointsViewer {
} else {
labelProvider = fView.getCheckboxViewer().getLabelProvider();
}
- fViewer.setSorter(new BreakpointsSorter());
+ fViewer.setComparator(new BreakpointsComparator());
fViewer.setLabelProvider(labelProvider);
fViewer.addCheckStateListener(fCheckListener);
IBreakpointOrganizer[] orgs = null;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
index 919230d31..e64eb3ec6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
@@ -51,7 +51,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
+import org.eclipse.ui.model.WorkbenchViewerComparator;
import com.ibm.icu.text.MessageFormat;
@@ -168,7 +168,7 @@ public class FavoritesDialog extends TrayDialog {
}
list.removeAll(getFavorites());
Object[] objs = list.toArray();
- new WorkbenchViewerSorter().sort(getFavoritesTable(), objs);
+ new WorkbenchViewerComparator().sort(getFavoritesTable(), objs);
return objs;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
index 7dbe5571f..dd5efe24d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
@@ -33,7 +33,6 @@ import org.eclipse.debug.internal.core.IConfigurationElementConstants;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
import com.ibm.icu.text.MessageFormat;
@@ -170,33 +169,20 @@ public class LaunchConfigurationPresentationManager {
}
/**
- * Returns the listing of <code>ILaunchConfigurationTab</code>s for the specified <code>ILaunchConfigurationTabGroup</code>.
- * If no tabs are found for the specified id an empty array is returned, never <code>null</code>
- * @param groupid
- * @return the <code>ILaunchConfigurationTab</code>s for the specified <code>ILaunchConfigurationTabGroup</code> id,
- * or an empty array if none are found
+ * Returns the proxy elements for all contributed tabs for the specified tab group id
+ * @param groupid the id of the tab group
+ * @return the listing of all of the tab extensions or an empty array, never <code>null</code>
*
- * <p>
- * <strong>EXPERIMENTAL</strong>. This method has been added as
- * part of a work in progress. There is no guarantee that this API will
- * remain unchanged during the 3.3 release cycle. Please do not use this API
- * without consulting with the Platform/Debug team.
- * </p>
* @since 3.3
+ *
+ * EXPERIMENTAL
*/
- public ILaunchConfigurationTab[] createContributedTabs(String groupid) {
+ protected LaunchConfigurationTabExtension[] getTabExtensions(String groupid) {
Hashtable tabs = (Hashtable) fContributedTabs.get(groupid);
- ArrayList list = new ArrayList();
if(tabs != null) {
- LaunchConfigurationTabExtension ext = null;
- for(Iterator iter = tabs.keySet().iterator(); iter.hasNext();) {
- ext = (LaunchConfigurationTabExtension) tabs.get(iter.next());
- if(ext != null) {
- list.add(ext.getTab());
- }
- }
+ return (LaunchConfigurationTabExtension[]) tabs.values().toArray(new LaunchConfigurationTabExtension[tabs.size()]);
}
- return (ILaunchConfigurationTab[]) list.toArray(new ILaunchConfigurationTab[list.size()]);
+ return new LaunchConfigurationTabExtension[0];
}
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 1db34a2f1..7fe735d07 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -11,7 +11,6 @@
package org.eclipse.debug.internal.ui.launchConfigurations;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -24,7 +23,6 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.core.LaunchManager;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
import org.eclipse.debug.internal.ui.SWTUtil;
@@ -295,22 +293,23 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
fOptionsLink.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
//collect the options available
- SelectLaunchModesDialog sld = new SelectLaunchModesDialog(getShell(),
- getLaunchConfigurationDialog().getMode(),
- ((LaunchManager)DebugPlugin.getDefault().getLaunchManager()).getLaunchDelegates(fTabType.getIdentifier()));
- if(sld.open() == IDialogConstants.OK_ID) {
- //set the options to the config
- Object[] res = sld.getResult();
- if(res != null) {
- HashSet list = new HashSet();
- for(int i = 0; i < res.length; i++) {
- list.add(res[i]);
+ try {
+ SelectLaunchModesDialog sld = new SelectLaunchModesDialog(getShell(),
+ getLaunchConfigurationDialog().getMode(), getWorkingCopy());
+ if(sld.open() == IDialogConstants.OK_ID) {
+ //set the options to the config
+ Object[] res = sld.getResult();
+ if(res != null) {
+ Set modes = (Set) res[0];
+ modes.remove(getLaunchConfigurationDialog().getMode());
+ ILaunchConfigurationWorkingCopy wc = getWorkingCopy();
+ wc.setModes(modes);
+ refresh();
+ refreshStatus();
}
- ILaunchConfigurationWorkingCopy wc = getWorkingCopy();
- wc.setModes(list);
- refresh();
- refreshStatus();
}
+ } catch (CoreException ex) {
+ // TODO:
}
}
public void widgetDefaultSelected(SelectionEvent e) {}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
index 266941e0a..e99f9139c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
@@ -1,8 +1,13 @@
package org.eclipse.debug.internal.ui.launchConfigurations;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
@@ -23,7 +28,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
private ILaunchConfigurationTabGroup fGroup = null;
private String fGroupId = null;
- private ILaunchConfigurationTab[] fContributedTabs = null;
+ private List fTabs = null;
/**
* Constructor
@@ -47,12 +52,10 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#dispose()
*/
public void dispose() {
- if(fGroup != null) {
- fGroup.dispose();
- }
- if(fContributedTabs != null) {
- for(int i = 0; i < fContributedTabs.length; i++) {
- fContributedTabs[i].dispose();
+ if(fTabs != null) {
+ ILaunchConfigurationTab[] tabs = getTabs();
+ for(int i = 0; i < tabs.length; i++) {
+ tabs[i].dispose();
}
}
}
@@ -61,28 +64,59 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#getTabs()
*/
public ILaunchConfigurationTab[] getTabs() {
- if(fContributedTabs == null) {
- fContributedTabs = LaunchConfigurationPresentationManager.getDefault().createContributedTabs(fGroupId);
+ if(fTabs == null) {
+ fTabs = new ArrayList();
+ ILaunchConfigurationTab[] tmp = fGroup.getTabs();
+ for(int i = 0; i < tmp.length; i++) {
+ fTabs.add(tmp[i]);
+ }
+ LaunchConfigurationTabExtension[] ext = LaunchConfigurationPresentationManager.getDefault().getTabExtensions(fGroupId);
+ //copy contributed into correct postion or end if no id or id is not found
+ AbstractLaunchConfigurationTab alct = null;
+ String id = null;
+ List item = null;
+ for(int i = 0; i < ext.length; i++) {
+ id = ext[i].getRelativeTabId();
+ if(id != null) {
+ //position specified, try to find it
+ boolean found = false;
+ for(int j = 0; j < tmp.length; j++) {
+ if(tmp[j] instanceof AbstractLaunchConfigurationTab) {
+ alct = (AbstractLaunchConfigurationTab) tmp[j];
+ if(id.equals(alct.getTabId())) {
+ if(j != tmp.length-1) {
+ item = new ArrayList();
+ item.add(ext[i].getTab());
+ fTabs.addAll(j+1, item);
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+ if(!found) {
+ //id did not match any tabs, add it to the end
+ fTabs.add(ext[i].getTab());
+ }
+ }
+ else {
+ //no position specified, add it to the end
+ fTabs.add(ext[i].getTab());
+ }
+ }
}
- ILaunchConfigurationTab[] grouptabs = fGroup.getTabs();
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[grouptabs.length + fContributedTabs.length];
- System.arraycopy(grouptabs, 0, tabs, 0, grouptabs.length);
- System.arraycopy(fContributedTabs, 0, tabs, grouptabs.length, fContributedTabs.length);
- return tabs;
+ return (ILaunchConfigurationTab[]) fTabs.toArray(new ILaunchConfigurationTab[fTabs.size()]);
}
/**
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
*/
public void initializeFrom(ILaunchConfiguration configuration) {
- if(fGroup != null) {
- fGroup.initializeFrom(configuration);
- }
- if(fContributedTabs == null) {
+ if(fTabs == null) {
getTabs();
}
- for(int i = 0; i < fContributedTabs.length; i++) {
- fContributedTabs[i].initializeFrom(configuration);
+ for(int i = 0; i < fTabs.size(); i++) {
+ ((ILaunchConfigurationTab)fTabs.get(i)).initializeFrom(configuration);
}
}
@@ -99,13 +133,9 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- if(fGroup != null) {
- fGroup.performApply(configuration);
- if(fContributedTabs == null) {
- getTabs();
- }
- for(int i = 0; i < fContributedTabs.length; i++) {
- fContributedTabs[i].performApply(configuration);
+ if(fTabs != null) {
+ for(int i = 0; i < fTabs.size(); i++) {
+ ((ILaunchConfigurationTab)fTabs.get(i)).performApply(configuration);
}
}
}
@@ -114,13 +144,9 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- if(fGroup != null) {
- fGroup.setDefaults(configuration);
- if(fContributedTabs == null) {
- getTabs();
- }
- for(int i = 0; i < fContributedTabs.length; i++) {
- fContributedTabs[i].setDefaults(configuration);
+ if(fTabs != null) {
+ for(int i = 0; i < fTabs.size(); i++) {
+ ((ILaunchConfigurationTab)fTabs.get(i)).setDefaults(configuration);
}
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypesViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypesViewer.java
index 8b368bbbf..eddab2433 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypesViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypesViewer.java
@@ -16,7 +16,7 @@ import org.eclipse.debug.ui.ILaunchGroup;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
@@ -61,7 +61,7 @@ public class LaunchConfigurationTypesViewer extends TableViewer {
super(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
setContentProvider(new ContentProvider());
setLabelProvider(DebugUITools.newDebugModelPresentation());
- setSorter(new ViewerSorter());
+ setComparator(new ViewerComparator());
addFilter(new LaunchGroupFilter(launchGroup));
setInput(DebugPlugin.getDefault().getLaunchManager());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
index eb979eaa5..9805edf93 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
@@ -49,7 +49,7 @@ import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
+import org.eclipse.ui.model.WorkbenchViewerComparator;
/**
* A tree view of launch configurations
@@ -136,7 +136,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
fTree.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
TreeViewer treeViewer = fTree.getViewer();
treeViewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
- treeViewer.setSorter(new WorkbenchViewerSorter());
+ treeViewer.setComparator(new WorkbenchViewerComparator());
treeViewer.setContentProvider(new LaunchConfigurationTreeContentProvider(fLaunchGroup.getMode(), parent.getShell()));
if(fFilters != null) {
for (int i = 0; i < fFilters.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index 797eec9c1..e41eccae2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -210,16 +210,10 @@ public class LaunchConfigurationsMessages extends NLS {
public static String CollapseAllLaunchConfigurationAction_2;
- public static String SelectLaunchOptionsDialog_0;
-
- public static String SelectLaunchOptionsDialog_1;
-
public static String SelectLaunchOptionsDialog_2;
public static String SelectLaunchOptionsDialog_3;
public static String SelectLaunchOptionsDialog_4;
- public static String SelectLaunchOptionsDialog_5;
-
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index 7af00dd95..abfd8d4d5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -169,9 +169,6 @@ FilterDropDownMenuCreator_4=Apply Window &Working Set(s)
CollapseAllLaunchConfigurationAction_0=Collapse All
CollapseAllLaunchConfigurationAction_1=Collapses all expanded launch configurations.
CollapseAllLaunchConfigurationAction_2=This action collapses all of the launch configurations currently visible and expanded.
-SelectLaunchOptionsDialog_0=\ (with no options)
-SelectLaunchOptionsDialog_1=:
-SelectLaunchOptionsDialog_2=A plugin that once provided the ability to launch the saved set of launch options for the current launch configuration is no longer available. As such, you must select a valid set of launch options that can be launched
-SelectLaunchOptionsDialog_3=Select Launch Options
-SelectLaunchOptionsDialog_4=&Select a supported options combination:
-SelectLaunchOptionsDialog_5=\ for
+SelectLaunchOptionsDialog_2=A plug-in that once provided the ability to launch the saved set of launch options for the current launch configuration is no longer available. As such, you must select a valid set of launch options that can be launched
+SelectLaunchOptionsDialog_3=Select Launch Mode
+SelectLaunchOptionsDialog_4=&Select a supported mode combination:
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
index b21102257..736539348 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
@@ -10,9 +10,13 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.launchConfigurations;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Set;
-import org.eclipse.debug.internal.core.LaunchDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
import org.eclipse.debug.internal.ui.SWTUtil;
@@ -49,15 +53,14 @@ import org.eclipse.ui.dialogs.SelectionDialog;
public class SelectLaunchModesDialog extends SelectionDialog {
/**
- * Builds labels for list control of the form: Mode + (no options) | [options list]
+ * Builds labels for list control
*/
class OptionsLabelProvider implements ILabelProvider {
public Image getImage(Object element) {return null;}
public String getText(Object element) {
- LaunchDelegate del = (LaunchDelegate) element;
- Set set = del.getOptions();
- // TODO: illegal NLS
- return del.getName() + LaunchConfigurationsMessages.SelectLaunchOptionsDialog_5 + fMode + (set.isEmpty() ? LaunchConfigurationsMessages.SelectLaunchOptionsDialog_0 : LaunchConfigurationsMessages.SelectLaunchOptionsDialog_1 + set);
+ Set modes = (Set) element;
+ List names = LaunchConfigurationPresentationManager.getDefault().getLaunchModeNames(modes);
+ return names.toString();
}
public void addListener(ILabelProviderListener listener) {}
public void dispose() {}
@@ -67,11 +70,9 @@ public class SelectLaunchModesDialog extends SelectionDialog {
private static final String SETTINGS_ID = IDebugUIConstants.PLUGIN_ID + ".SELECT_LAUNCH_OPTIONS_DIALOG"; //$NON-NLS-1$
- private LaunchDelegate[] fDelegates = null;
- private String fMode = null;
- private Object[] fResult = null;
private CheckboxTableViewer fTableViewer = null;
private Table fTable = null;
+ private List fValidCombinations;
/**
* Constructor
@@ -79,13 +80,19 @@ public class SelectLaunchModesDialog extends SelectionDialog {
* @param message the message for the dialog
* @param options the listing of arrays of options (each entry in the list must be an <code>Set</code> of options)
*/
- public SelectLaunchModesDialog(Shell parentShell, String mode, LaunchDelegate[] delegates) {
+ public SelectLaunchModesDialog(Shell parentShell, String mode, ILaunchConfiguration configuration) throws CoreException {
super(parentShell);
super.setMessage(LaunchConfigurationsMessages.SelectLaunchOptionsDialog_2);
super.setTitle(LaunchConfigurationsMessages.SelectLaunchOptionsDialog_3);
setShellStyle(getShellStyle() | SWT.RESIZE);
- fDelegates = delegates;
- fMode = mode;
+ Set[] combinations = configuration.getType().getSupportedModeCombinations();
+ fValidCombinations = new ArrayList();
+ for (int i = 0; i < combinations.length; i++) {
+ Set set = combinations[i];
+ if (set.contains(mode)) {
+ fValidCombinations.add(set);
+ }
+ }
}
/**
@@ -100,7 +107,7 @@ public class SelectLaunchModesDialog extends SelectionDialog {
fTableViewer = new CheckboxTableViewer(fTable);
fTableViewer.setLabelProvider(new OptionsLabelProvider());
fTableViewer.setContentProvider(new ArrayContentProvider());
- fTableViewer.setInput(fDelegates);
+ fTableViewer.setInput(fValidCombinations.toArray());
fTableViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
fTableViewer.setAllChecked(false);
@@ -111,13 +118,6 @@ public class SelectLaunchModesDialog extends SelectionDialog {
PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.SELECT_LAUNCH_OPTIONS_DIALOG);
return comp;
}
-
- /**
- * @see org.eclipse.ui.dialogs.SelectionDialog#getResult()
- */
- public Object[] getResult() {
- return fResult;
- }
/**
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
@@ -125,7 +125,7 @@ public class SelectLaunchModesDialog extends SelectionDialog {
protected void okPressed() {
Object[] o = fTableViewer.getCheckedElements();
if(o.length > 0) {
- fResult = ((LaunchDelegate)o[0]).getOptions().toArray();
+ setResult(Arrays.asList(o));
}
super.okPressed();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchOptionsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchOptionsDialog.java
deleted file mode 100644
index c025d932f..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchOptionsDialog.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.Set;
-
-import org.eclipse.debug.internal.core.LaunchDelegate;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.SWTUtil;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.SelectionDialog;
-
-/**
- * This class provides a dialog to present the user with a list of of viable launch options in the event
- * the plugin that provides either a launch option or a contributed launch delegate is no longer available.
- * The user can select one of the launch mode/option configuration sform this dialog and repair the option
- * configuration state of the the current launch configuration
- *
- * @since 3.3
- *
- * EXPERIMENTAL
- */
-public class SelectLaunchOptionsDialog extends SelectionDialog {
-
- /**
- * Builds labels for list control of the form: Mode + (no options) | [optionslist]
- */
- class OptionsLabelProvider implements ILabelProvider {
- public Image getImage(Object element) {return null;}
- public String getText(Object element) {
- LaunchDelegate del = (LaunchDelegate) element;
- Set set = del.getOptions();
- return del.getName() + LaunchConfigurationsMessages.SelectLaunchOptionsDialog_5 + fMode + (set.isEmpty() ? LaunchConfigurationsMessages.SelectLaunchOptionsDialog_0 : LaunchConfigurationsMessages.SelectLaunchOptionsDialog_1 + set);
- }
- public void addListener(ILabelProviderListener listener) {}
- public void dispose() {}
- public boolean isLabelProperty(Object element, String property) {return false;}
- public void removeListener(ILabelProviderListener listener) {}
- }
-
- private static final String SETTINGS_ID = IDebugUIConstants.PLUGIN_ID + ".SELECT_LAUNCH_OPTIONS_DIALOG"; //$NON-NLS-1$
-
- private LaunchDelegate[] fDelegates = null;
- private String fMode = null;
- private Object[] fResult = null;
- private CheckboxTableViewer fTableViewer = null;
- private Table fTable = null;
-
- /**
- * Constructor
- * @param parentShell the parent shell
- * @param message the message for the dialog
- * @param options the listing of arrays of options (each entry in the list must be an <code>Set</code> of options)
- */
- public SelectLaunchOptionsDialog(Shell parentShell, String mode, LaunchDelegate[] delegates) {
- super(parentShell);
- super.setMessage(LaunchConfigurationsMessages.SelectLaunchOptionsDialog_2);
- super.setTitle(LaunchConfigurationsMessages.SelectLaunchOptionsDialog_3);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- fDelegates = delegates;
- fMode = mode;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- initializeDialogUnits(parent);
- Composite comp = (Composite) super.createDialogArea(parent);
- SWTUtil.createLabel(comp, LaunchConfigurationsMessages.SelectLaunchOptionsDialog_4, 1);
- fTable = new Table(comp, SWT.BORDER | SWT.SINGLE | SWT.CHECK);
- fTable.setLayoutData(new GridData(GridData.FILL_BOTH));
- fTableViewer = new CheckboxTableViewer(fTable);
- fTableViewer.setLabelProvider(new OptionsLabelProvider());
- fTableViewer.setContentProvider(new ArrayContentProvider());
- fTableViewer.setInput(fDelegates);
- fTableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- fTableViewer.setAllChecked(false);
- fTableViewer.setChecked(event.getElement(), true);
- }
- });
- Dialog.applyDialogFont(comp);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.SELECT_LAUNCH_OPTIONS_DIALOG);
- return comp;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.SelectionDialog#getResult()
- */
- public Object[] getResult() {
- return fResult;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- Object[] o = fTableViewer.getCheckedElements();
- if(o.length > 0) {
- fResult = ((LaunchDelegate)o[0]).getOptions().toArray();
- }
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(SETTINGS_ID);
- if (section == null) {
- section = settings.addNewSection(SETTINGS_ID);
- }
- return section;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
- */
- protected Point getInitialSize() {
- IDialogSettings settings = getDialogBoundsSettings();
- if(settings != null) {
- try {
- int width = settings.getInt("DIALOG_WIDTH"); //$NON-NLS-1$
- int height = settings.getInt("DIALOG_HEIGHT"); //$NON-NLS-1$
- if(width > 0 & height > 0) {
- return new Point(width, height);
- }
- }
- catch (NumberFormatException nfe) {
- return new Point(350, 400);
- }
- }
- return new Point(350, 400);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
index d96aa9dd1..5dbe4adec 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
@@ -61,7 +61,7 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ListSelectionDialog;
import org.eclipse.ui.model.AdaptableList;
import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
+import org.eclipse.ui.model.WorkbenchViewerComparator;
/**
* Provides the Launch Configuration preference page to the Run/Debug preferences
@@ -252,7 +252,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
CheckboxTableViewer tviewer = new CheckboxTableViewer(fTable);
tviewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
tviewer.setContentProvider(new TableContentProvider());
- tviewer.setSorter(new WorkbenchViewerSorter());
+ tviewer.setComparator(new WorkbenchViewerComparator());
LaunchGroupExtension[] groups = new LaunchGroupExtension[] {
DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(DEBUG_LAUNCH_GROUP),
DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(EXT_BUILDER_GROUP)};
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/PerspectivePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/PerspectivePreferencePage.java
index 744323ffb..ece9cf4bd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/PerspectivePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/PerspectivePreferencePage.java
@@ -63,7 +63,7 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.ActivityManagerEvent;
import org.eclipse.ui.activities.IActivityManagerListener;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
+import org.eclipse.ui.model.WorkbenchViewerComparator;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -516,7 +516,7 @@ public class PerspectivePreferencePage extends PreferencePage implements IWorkbe
fTree.setLayoutData(new GridData(GridData.FILL_BOTH));
fViewer = new TreeViewer(fTree);
fViewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
- fViewer.setSorter(new WorkbenchViewerSorter());
+ fViewer.setComparator(new WorkbenchViewerComparator());
fViewer.setContentProvider(new LaunchConfigurationTreeContentProviderNoChildren(null, parent.getShell()));
fViewer.addFilter(new LaunchGroupFilter(fLCM.getLaunchGroup(DEBUG_LAUNCH_GROUP)));
fViewer.setInput(fLManager.getLaunchConfigurationTypes());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
index bbe038dc1..08f9ecf65 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
@@ -10,10 +10,10 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.preferences;
-import com.ibm.icu.text.MessageFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.IValueVariable;
@@ -38,7 +38,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
@@ -60,6 +60,8 @@ import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
+import com.ibm.icu.text.MessageFormat;
+
/**
* Preference page for creating and configuring simple
* launch variables.
@@ -155,7 +157,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
variableTable.getControl().setLayoutData(gridData);
variableTable.setContentProvider(variableContentProvider);
variableTable.setColumnProperties(variableTableColumnProperties);
- variableTable.setSorter(new ViewerSorter() {
+ variableTable.setComparator(new ViewerComparator() {
public int compare(Viewer iViewer, Object e1, Object e2) {
if (e1 == null) {
return -1;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
index 439bdd0a4..244d6d4e1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
@@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -98,7 +98,7 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
fViewer.setLabelProvider(new SourceContainerLabelProvider());
fViewer.setContentProvider(new ArrayContentProvider());
- fViewer.setSorter(new ViewerSorter());
+ fViewer.setComparator(new ViewerComparator());
fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
index ffbb330a3..aa2613d6f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
@@ -13,6 +13,7 @@ package org.eclipse.debug.internal.ui.sourcelookup.browsers;
import java.util.ArrayList;
import java.util.List;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
@@ -32,7 +33,7 @@ import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.ui.views.navigator.ResourceComparator;
/**
* Adds an internal jar to the runtime class path.
@@ -86,7 +87,7 @@ public class ArchiveSourceContainerBrowser extends AbstractSourceContainerBrowse
dialog.setMessage(SourceLookupUIMessages.ArchiveSourceContainerBrowser_4);
dialog.addFilter(filter);
dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == Window.OK) {
Object[] result = dialog.getResult();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerDialog.java
index 1526915ce..f1122e510 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerDialog.java
@@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.ui.views.navigator.ResourceComparator;
/**
* The dialog for selecting the folder for which a source container will be created.
@@ -80,7 +80,7 @@ public class FolderSourceContainerDialog extends ElementTreeSelectionDialog {
super(parent, labelProvider, contentProvider);
setTitle(SourceLookupUIMessages.folderSelection_title); //
setInput(ResourcesPlugin.getWorkspace().getRoot());
- setSorter(new ResourceSorter(ResourceSorter.NAME));
+ setComparator(new ResourceComparator(ResourceComparator.NAME));
ISelectionStatusValidator validator= new ISelectionStatusValidator() {
public IStatus validate(Object[] selection) {
for (int i= 0; i < selection.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
index 0e88a9399..e2854a629 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
@@ -13,12 +13,12 @@ package org.eclipse.debug.internal.ui.viewers;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ICellModifier;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeViewer.java
index b302bd119..eb7771a27 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeViewer.java
@@ -17,6 +17,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -29,7 +30,6 @@ import org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousLabelAdapt
import org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditor;
import org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditorFactoryAdapter;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ICellModifier;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
index 30409e503..8383b727c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
@@ -12,6 +12,7 @@ package org.eclipse.debug.internal.ui.views.breakpoints;
import java.util.ArrayList;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IBreakpoint;
@@ -22,7 +23,6 @@ import org.eclipse.debug.internal.ui.importexport.breakpoints.EmbeddedBreakpoint
import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardPage;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsSorter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsSorter.java
deleted file mode 100644
index 523ebf909..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsSorter.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.views.breakpoints;
-
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-
-public class BreakpointsSorter extends ViewerSorter {
- /**
- * @see ViewerSorter#isSorterProperty(Object, String)
- */
- public boolean isSorterProperty(Object element,String propertyId) {
- return propertyId.equals(IBasicPropertyConstants.P_TEXT);
- }
-
- /**
- * Returns a negative, zero, or positive number depending on whether
- * the first element is less than, equal to, or greater than
- * the second element.
- * <p>
- * Group breakpoints by debug model
- * within debug model, group breakpoints by type
- * within type groups, sort by line number (if applicable) and then
- * alphabetically by label
- *
- * @param viewer the viewer
- * @param e1 the first element
- * @param e2 the second element
- * @return a negative number if the first element is less than the
- * second element; the value <code>0</code> if the first element is
- * equal to the second element; and a positive number if the first
- * element is greater than the second element
- */
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (!(e1 instanceof IBreakpoint)) {
- return super.compare(viewer, e1, e2);
- }
-
- IBreakpoint b1= (IBreakpoint)e1;
- IBreakpoint b2= (IBreakpoint)e2;
- String modelId1= b1.getModelIdentifier();
- String modelId2= b2.getModelIdentifier();
- int result= modelId1.compareTo(modelId2);
- if (result != 0) {
- return result;
- }
- String type1= ""; //$NON-NLS-1$
- String type2= ""; //$NON-NLS-1$
- IMarker marker1= b1.getMarker();
- if (!marker1.exists()) {
- return 0;
- }
- try {
- type1= marker1.getType();
- } catch (CoreException ce) {
- DebugUIPlugin.log(ce);
- }
- try {
- IMarker marker2= b2.getMarker();
- if (!marker2.exists()) {
- return 0;
- }
- type2= marker2.getType();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
-
- result= type1.compareTo(type2);
- if (result != 0) {
- return result;
- }
- // model and type are the same
-
- ILabelProvider lprov = (ILabelProvider) ((StructuredViewer)viewer).getLabelProvider();
- String name1= lprov.getText(e1);
- String name2= lprov.getText(e2);
-
- boolean lineBreakpoint= false;
- try {
- lineBreakpoint= marker1.isSubtypeOf(IBreakpoint.LINE_BREAKPOINT_MARKER);
- } catch (CoreException ce) {
- }
- if (lineBreakpoint) {
- return compareLineBreakpoints(b1, b2, name1,name2);
- }
-
- return name1.compareTo(name2);
- }
-
- protected int compareLineBreakpoints(IBreakpoint b1, IBreakpoint b2, String name1, String name2) {
- int colon1= name1.indexOf(':');
- if (colon1 != -1) {
- int colon2= name2.indexOf(':');
- if (colon2 != -1) {
- String upToColon1= name1.substring(0, colon1);
- if (name2.startsWith(upToColon1)) {
- int l1= 0;
- int l2= 0;
- try {
- l1= ((ILineBreakpoint)b1).getLineNumber();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- try {
- l2= ((ILineBreakpoint)b2).getLineNumber();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- return l1 - l2;
- }
- }
- }
- return name1.compareTo(name2);
- }
- }
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
index 53ec366c0..cf020eb28 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
@@ -133,7 +133,7 @@ public class BreakpointsView extends AbstractDebugView implements ISelectionList
CheckboxTreeViewer viewer = new BreakpointsViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK));
setViewer(viewer);
viewer.setContentProvider(fContentProvider);
- viewer.setSorter(new BreakpointsSorter());
+ viewer.setComparator(new BreakpointsComparator());
viewer.setInput(DebugPlugin.getDefault().getBreakpointManager());
viewer.addCheckStateListener(fCheckListener);
viewer.addTreeListener(new ITreeViewerListener() {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
index de9091df2..df9f8233b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
@@ -277,7 +277,22 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura
public Image getImage() {
return null;
}
-
+
+ /**
+ * This method is used to get the id for the current tabg or <code>null</code> if none.
+ *
+ * Ids are used in 3.3 to allow contributed tabs
+ * to be placed in relative locations, instead of only at the end of the tab group
+ * @return the id of the tab or <code>null</code>
+ *
+ * @since 3.3
+ *
+ * EXPERIMENTAL
+ */
+ public String getTabId() {
+ return null;
+ }
+
/**
* Convenience method to set a boolean attribute of on a launch
* configuration. If the value being set is the default, the attribute's
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
index d3470f352..876ac4cbb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
@@ -757,6 +757,15 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
return LaunchConfigurationsMessages.CommonTab__Common_15;
}
+ /**
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getTabId()
+ *
+ * @since 3.3
+ */
+ public String getTabId() {
+ return "org.eclipse.debug.ui.commonTab"; //$NON-NLS-1$
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave()
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
index 304237450..5eea38ba3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
@@ -11,7 +11,6 @@
*******************************************************************************/
package org.eclipse.debug.ui;
-import com.ibm.icu.text.MessageFormat;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
@@ -49,7 +48,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -68,6 +67,8 @@ import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ListSelectionDialog;
+import com.ibm.icu.text.MessageFormat;
+
/**
* Launch configuration tab for configuring the environment passed
* into Runtime.exec(...) when a config is launched.
@@ -141,7 +142,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
if (tableViewer.getTable().isDisposed()) {
return;
}
- tableViewer.setSorter(new ViewerSorter() {
+ tableViewer.setComparator(new ViewerComparator() {
public int compare(Viewer iviewer, Object e1, Object e2) {
if (e1 == null) {
return -1;
@@ -615,6 +616,15 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
return LaunchConfigurationsMessages.EnvironmentTab_Environment_7;
}
+ /**
+ * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getTabId()
+ *
+ * @since 3.3
+ */
+ public String getTabId() {
+ return "org.eclipse.debug.ui.environmentTab"; //$NON-NLS-1$
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
*/

Back to the top