Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2004-03-17 16:37:35 -0500
committerDarin Wright2004-03-17 16:37:35 -0500
commit053b19acd0afc7905f62f7b3dd1da39b5ce28592 (patch)
tree4b3d5715e18a88882e35dbb9975ab4b0475cc637
parent2f004b82c9ae6dbd849d96bcfebf844bbd39dffd (diff)
downloadeclipse.platform.debug-053b19acd0afc7905f62f7b3dd1da39b5ce28592.tar.gz
eclipse.platform.debug-053b19acd0afc7905f62f7b3dd1da39b5ce28592.tar.xz
eclipse.platform.debug-053b19acd0afc7905f62f7b3dd1da39b5ce28592.zip
Bug 29890 - Debug Platform Source Lookup Facilites
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/AbstractSourceLookupDirector.java23
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceContainerType.java8
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceLookupDirector.java10
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceContainerType.java6
-rw-r--r--org.eclipse.debug.core/plugin.properties8
-rw-r--r--org.eclipse.debug.core/plugin.xml18
-rw-r--r--org.eclipse.debug.core/schema/sourceContainerTypes.exsd19
-rw-r--r--org.eclipse.debug.ui/plugin.xml22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AbstractUISourceLookupDirector.java73
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddContainerAction.java21
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java107
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ISourceContainerBrowser.java15
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/MultipleSourceSelectionDialog.java211
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/Prompter.java77
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java84
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLabelProvider.java40
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupPanel.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupTab.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementAdapterFactory.java37
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementWorkbenchAdapter.java70
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerBrowser.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkspaceSourceContainerBrowser.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java9
27 files changed, 512 insertions, 402 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/AbstractSourceLookupDirector.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/AbstractSourceLookupDirector.java
index 1040dede1..45eaf348b 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/AbstractSourceLookupDirector.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/AbstractSourceLookupDirector.java
@@ -17,13 +17,16 @@ import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationListener;
import org.eclipse.debug.core.ILaunchListener;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.internal.core.sourcelookup.containers.DefaultSourceContainer;
import org.w3c.dom.Document;
@@ -71,6 +74,9 @@ public abstract class AbstractSourceLookupDirector implements ISourceLookupDirec
//whether duplicates should be searched for or not
protected boolean fDuplicates = false;
+ protected static final IStatus fPromptStatus = new Status(IStatus.INFO, "org.eclipse.debug.ui", 200, "", null); //$NON-NLS-1$//$NON-NLS-2$
+ protected static final IStatus fResolveDuplicatesStatus = new Status(IStatus.INFO, "org.eclipse.debug.ui", 205, "", null); //$NON-NLS-1$//$NON-NLS-2$
+
// XML nodes & attributes for persistence
protected static final String DIRECTOR_ROOT_NODE = "sourceLookupDirector"; //$NON-NLS-1$
protected static final String CONTAINERS_NODE = "sourceContainers"; //$NON-NLS-1$
@@ -383,7 +389,16 @@ public abstract class AbstractSourceLookupDirector implements ISourceLookupDirec
* @return a single source element for the given stack frame
*/
public Object resolveSourceElement(IStackFrame frame, List sources) {
- // TODO: use a status handler (prompter) in the UI
+ IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(fPromptStatus);
+ if (prompter != null) {
+ try {
+ Object result = prompter.handleStatus(fResolveDuplicatesStatus, new Object[]{frame, sources});
+ if (result != null) {
+ return result;
+ }
+ } catch (CoreException e) {
+ }
+ }
return sources.get(0);
}
@@ -469,4 +484,10 @@ public abstract class AbstractSourceLookupDirector implements ISourceLookupDirec
public ISourceLookupParticipant[] getParticipants() {
return (ISourceLookupParticipant[]) fParticipants.toArray(new ISourceLookupParticipant[fParticipants.size()]);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector#supportsSourceContainerType(org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType)
+ */
+ public boolean supportsSourceContainerType(ISourceContainerType type) {
+ return true;
+ }
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceContainerType.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceContainerType.java
index 3a1dc7889..cf7c226fd 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceContainerType.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceContainerType.java
@@ -48,4 +48,12 @@ public interface ISourceContainerType extends ISourceContainerTypeDelegate {
*/
public String getId();
+ /**
+ * Returns a short description of this source container type that can be used
+ * for presenetation purposes, or <code>null</code> if none.
+ *
+ * @return a short description of this source container type, or <code>null</code>
+ */
+ public String getDescription();
+
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceLookupDirector.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceLookupDirector.java
index 4b38631bc..0feceebe3 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceLookupDirector.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/ISourceLookupDirector.java
@@ -63,4 +63,14 @@ public interface ISourceLookupDirector extends IPersistableSourceLocator2 {
* its set of source lookup participants.
*/
public void initializeParticipants();
+
+ /**
+ * Returns whether this source director supports the given type
+ * of source location.
+ *
+ * @param type source container type
+ * @return whether this source director supports the given type
+ * of source location
+ */
+ public boolean supportsSourceContainerType(ISourceContainerType type);
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceContainerType.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceContainerType.java
index 4cefeed18..666de6f26 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceContainerType.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceContainerType.java
@@ -75,4 +75,10 @@ public class SourceContainerType implements ISourceContainerType {
}
return fDelegate;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType#getDescription()
+ */
+ public String getDescription() {
+ return fElement.getAttribute("description"); //$NON-NLS-1$
+ }
}
diff --git a/org.eclipse.debug.core/plugin.properties b/org.eclipse.debug.core/plugin.properties
index d6bdedbd0..f72c05e5a 100644
--- a/org.eclipse.debug.core/plugin.properties
+++ b/org.eclipse.debug.core/plugin.properties
@@ -35,8 +35,14 @@ profile=&Profile
env_var.description=The value of an environment variable. A variable name must be specified as an argument.
containerName.archive = Archive
+containerDescription.archive = An archive
containerName.project = Project
+containerDescription.project = A project in the workspace
containerName.folder = Folder
+containerDescription.folder = A folder in the workspace
containerName.directory = Directory
+containerDescription.directory = A directory in the local file system
containerName.workspace = Workspace
-containerName.default = Default \ No newline at end of file
+containerDescription.workspace = All projects in the workspace
+containerName.default = Default
+containerDescription.default = Default source lookup path \ No newline at end of file
diff --git a/org.eclipse.debug.core/plugin.xml b/org.eclipse.debug.core/plugin.xml
index ce25b555a..a0c44bb5b 100644
--- a/org.eclipse.debug.core/plugin.xml
+++ b/org.eclipse.debug.core/plugin.xml
@@ -111,32 +111,38 @@
<sourceContainerType
name="%containerName.project"
class="org.eclipse.debug.internal.core.sourcelookup.containers.ProjectSourceContainerType"
- id="org.eclipse.debug.core.containerType.project">
+ id="org.eclipse.debug.core.containerType.project"
+ description="%containerDescription.project">
</sourceContainerType>
<sourceContainerType
name="%containerName.folder"
class="org.eclipse.debug.internal.core.sourcelookup.containers.FolderSourceContainerType"
- id="org.eclipse.debug.core.containerType.folder">
+ id="org.eclipse.debug.core.containerType.folder"
+ description="%containerDescription.folder">
</sourceContainerType>
<sourceContainerType
name="%containerName.directory"
class="org.eclipse.debug.internal.core.sourcelookup.containers.DirectorySourceContainerType"
- id="org.eclipse.debug.core.containerType.directory">
+ id="org.eclipse.debug.core.containerType.directory"
+ description="%containerDescription.directory">
</sourceContainerType>
<sourceContainerType
name="%containerName.workspace"
class="org.eclipse.debug.internal.core.sourcelookup.containers.WorkspaceSourceContainerType"
- id="org.eclipse.debug.core.containerType.workspace">
+ id="org.eclipse.debug.core.containerType.workspace"
+ description="%containerDescription.workspace">
</sourceContainerType>
<sourceContainerType
name="%containerName.default"
class="org.eclipse.debug.internal.core.sourcelookup.containers.DefaultSourceContainerType"
- id="org.eclipse.debug.core.containerType.default">
+ id="org.eclipse.debug.core.containerType.default"
+ description="%containerDescription.default">
</sourceContainerType>
<sourceContainerType
name="%containerName.archive"
class="org.eclipse.debug.internal.core.sourcelookup.containers.ArchiveSourceContainerType"
- id="org.eclipse.debug.core.containerType.archive">
+ id="org.eclipse.debug.core.containerType.archive"
+ description="%containerDescription.archive">
</sourceContainerType>
</extension>
diff --git a/org.eclipse.debug.core/schema/sourceContainerTypes.exsd b/org.eclipse.debug.core/schema/sourceContainerTypes.exsd
index 9e3fa5b86..e6a4e2f57 100644
--- a/org.eclipse.debug.core/schema/sourceContainerTypes.exsd
+++ b/org.eclipse.debug.core/schema/sourceContainerTypes.exsd
@@ -6,7 +6,7 @@
<meta.schema plugin="org.eclipse.debug.core" id="sourceContainerTypes" name="Source Container Types"/>
</appInfo>
<documentation>
- This extension point allows for an extensible set of source container types to be contributed by the debug platform
+ This extension point allows for an extensible set of source container types to be contributed by the debug platform
source lookup facilities.
</documentation>
</annotation>
@@ -66,6 +66,13 @@
</appInfo>
</annotation>
</attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ A short description of this source container for presentation purposes.
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
@@ -110,11 +117,11 @@
<meta.section type="copyright"/>
</appInfo>
<documentation>
- &lt;p&gt;
- &lt;a href=&quot;hglegal.htm&quot;&gt;
- &lt;img SRC=&quot;ngibmcpy.gif&quot;
- ALT=&quot;Copyright (c) 2003, 2004 IBM Corporation and others. All Rights Reserved.&quot;
- BORDER=0 height=14 width=324&gt;&lt;/a&gt;
+ &lt;p&gt;
+ &lt;a href=&quot;hglegal.htm&quot;&gt;
+ &lt;img SRC=&quot;ngibmcpy.gif&quot;
+ ALT=&quot;Copyright (c) 2003, 2004 IBM Corporation and others. All Rights Reserved.&quot;
+ BORDER=0 height=14 width=324&gt;&lt;/a&gt;
&lt;/p&gt;
</documentation>
</annotation>
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index 08985f254..2519acb63 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -1179,6 +1179,18 @@
class="org.eclipse.debug.internal.ui.WorkingDirectoryStatusHandler"
id="org.eclipse.debug.ui.statusHandler.workingDirectory">
</statusHandler>
+ <statusHandler
+ code="200"
+ plugin="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.sourcelookup.Prompter"
+ id="org.eclipse.debug.ui.statusHandler.prompter">
+ </statusHandler>
+ <statusHandler
+ code="205"
+ plugin="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.sourcelookup.ResolveDuplicatesHandler"
+ id="org.eclipse.debug.ui.statusHandler.selectSourceDialog">
+ </statusHandler>
</extension>
<extension
point="org.eclipse.debug.ui.launchGroups">
@@ -1712,6 +1724,16 @@
</sourceContainerPresentation>
</extension>
<!-- ========================================= -->
+<!-- Adapter factories for source lookup -->
+<!-- ========================================= -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.debug.internal.ui.sourcelookup.SourceElementAdapterFactory"
+ adaptableType="org.eclipse.debug.internal.core.sourcelookup.containers.LocalFileStorage">
+ <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
+ </factory>
+ </extension>
+<!-- ========================================= -->
<!-- Contextual Launch Menu (Work in Progress) -->
<!-- ========================================= -->
<extension
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AbstractUISourceLookupDirector.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AbstractUISourceLookupDirector.java
deleted file mode 100644
index b7724d2b3..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AbstractUISourceLookupDirector.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.sourcelookup;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.internal.core.sourcelookup.AbstractSourceLookupDirector;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.window.Window;
-
-
-/**
- * The UI implementation of an AbstractSourceLookupDirector.
- */
-public abstract class AbstractUISourceLookupDirector extends AbstractSourceLookupDirector {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.sourcelookup.AbstractSourceLookupDirector#resolveSourceElement(org.eclipse.debug.core.model.IStackFrame, java.util.List)
- */
- public Object resolveSourceElement(IStackFrame frame, List sources) {
- Object file = null;
- //TODO check if multiple source not found editors
- sources = removeSourceNotFoundEditors(sources);
- if(sources.size() == 1)
- return sources.get(0);
- else if(sources.size() == 0)
- return null;
- final MultipleSourceSelectionDialog dialog = new MultipleSourceSelectionDialog(DebugUIPlugin.getShell(), sources);
- DebugUIPlugin.getShell().getDisplay().syncExec(
- new Runnable() {
- public void run() {
- dialog.open();
- }
- });
- if(dialog.getReturnCode() == Window.OK)
- file = dialog.getSelection();
- return file;
- }
-
- /**
- * Remove extra source not found editors, if any.
- * If multiple source not found editors and no "real" source inputs,
- * return the first source not found editor.
- * @param sources the list to be filtered
- * @return the filtered list, may be empty
- */
- private List removeSourceNotFoundEditors(List sources){
- Iterator iterator = sources.iterator();
- List filteredList = new ArrayList();
- Object next;
- while(iterator.hasNext())
- {
- next = iterator.next();
- if(next instanceof CommonSourceNotFoundEditor)
- filteredList.add(next);
- }
- if(sources.isEmpty() && sources.get(0) != null)
- filteredList.add(sources.get(0));
- return filteredList;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddContainerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddContainerAction.java
index 92ec9506a..9f4a10e87 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddContainerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddContainerAction.java
@@ -9,8 +9,11 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.internal.ui.sourcelookup;
-import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.actions.SelectionListenerAction;
/**
@@ -20,9 +23,11 @@ import org.eclipse.jface.viewers.IStructuredSelection;
*/
public class AddContainerAction extends SourceContainerAction {
+ private ISourceLookupDirector fDirector;
+
public AddContainerAction() {
- super(SourceLookupUIMessages.getString("sourceTab.addButton")); //$NON-NLS-1$
- }
+ super(SourceLookupUIMessages.getString("sourceTab.addButton")); //$NON-NLS-1$
+ }
/**
* Prompts for a project to add.
@@ -30,10 +35,18 @@ public class AddContainerAction extends SourceContainerAction {
* @see IAction#run()
*/
public void run() {
- Dialog dialog = new AddSourceContainerDialog(getShell(), getViewer());
+ ILaunchConfiguration configuration = null;
+ if (fDirector != null) {
+ configuration = fDirector.getLaunchConfiguration();
+ }
+ AddSourceContainerDialog dialog = new AddSourceContainerDialog(getShell(), getViewer(), configuration, fDirector);
dialog.open();
}
+ public void setSourceLookupDirector(ISourceLookupDirector director) {
+ fDirector = director;
+ }
+
/**
* @see SelectionListenerAction#updateSelection(IStructuredSelection)
*/
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 94a639eb9..489e2f9ac 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
@@ -12,8 +12,10 @@ package org.eclipse.debug.internal.ui.sourcelookup;
import java.util.ArrayList;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType;
+import org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.internal.core.sourcelookup.SourceLookupUtils;
import org.eclipse.debug.internal.ui.DebugPluginImages;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
@@ -21,13 +23,17 @@ import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -47,39 +53,18 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
private TableViewer fViewer;
private SourceContainerViewer fSourceContainerViewer;
private boolean fDoubleClickSelects = true;
+ private ILaunchConfiguration fConfiguration;
+ private ISourceLookupDirector fDirector;
/**
- * Label content provider to retrieve source container names and icons from
- * ISourceContainerType
- */
- class SourceContainerTypeLabelProvider extends LabelProvider {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if (element instanceof ISourceContainerType)
- return ((ISourceContainerType) element).getName();
-
- return super.getText(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- if (element instanceof ISourceContainerType)
- return SourceLookupUIUtils.getSourceContainerImage(((ISourceContainerType) element).getId());
-
- return super.getImage(element);
- }
- }
- /**
* Constructor
*/
- public AddSourceContainerDialog(Shell shell, SourceContainerViewer viewer)
- {
+ public AddSourceContainerDialog(Shell shell, SourceContainerViewer viewer, ILaunchConfiguration configuration, ISourceLookupDirector director) {
super(shell);
- fSourceContainerViewer=viewer;
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ fSourceContainerViewer=viewer;
+ fConfiguration = configuration;
+ fDirector = director;
}
/**
@@ -93,37 +78,42 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
Composite parent = new Composite(ancestor, SWT.NULL);
GridData gd= new GridData(GridData.FILL_BOTH);
- gd.grabExcessHorizontalSpace=true;
- gd.grabExcessVerticalSpace=true;
GridLayout topLayout = new GridLayout();
topLayout.numColumns = 1;
parent.setLayout(topLayout);
parent.setLayoutData(gd);
+
+ ISourceContainerType[] types = filterTypes(SourceLookupUtils.getSourceContainerTypes());
- gd= new GridData(GridData.FILL_BOTH);
- gd.grabExcessHorizontalSpace=true;
- gd.grabExcessVerticalSpace=true;
-
- ISourceContainerType[] types = removeTypesWithoutBrowsers(SourceLookupUtils.getSourceContainerTypes());
- final Table containerTable = new Table(parent, SWT.SINGLE | SWT.BORDER);
- topLayout = new GridLayout();
- topLayout.numColumns = 1;
- containerTable.setLayout(topLayout);
- containerTable.setLayoutData(gd);
+ fViewer = new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE);
+ final Table table = fViewer.getTable();
+ gd = new GridData(GridData.FILL_BOTH);
+ table.setLayoutData(gd);
+
if (fDoubleClickSelects) {
- containerTable.addSelectionListener(new SelectionAdapter() {
+ table.addSelectionListener(new SelectionAdapter() {
public void widgetDefaultSelected(SelectionEvent e) {
- if (containerTable.getSelectionCount() == 1)
+ if (table.getSelectionCount() == 1)
okPressed();
}
});
}
- fViewer = new TableViewer(containerTable);
- fViewer.setLabelProvider(new SourceContainerTypeLabelProvider());
- fViewer.setContentProvider(new ArrayContentProvider());
- if(types.length != 0)
- {
+ fViewer.setLabelProvider(new SourceContainerLabelProvider());
+ fViewer.setContentProvider(new ArrayContentProvider());
+ fViewer.setSorter(new ViewerSorter());
+ fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ String desc = null;
+ if (!selection.isEmpty()) {
+ ISourceContainerType type = (ISourceContainerType) ((IStructuredSelection)selection).getFirstElement();
+ desc = type.getDescription();
+ }
+ setMessage(desc);
+ }
+ });
+ if(types.length != 0) {
fViewer.setInput(types);
fViewer.setSelection(new StructuredSelection(types[0]), true);
}
@@ -137,12 +127,15 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
* @param types the complete list of source container types
* @return the list of source container types that have browsers
*/
- private ISourceContainerType[] removeTypesWithoutBrowsers(ISourceContainerType[] types){
+ private ISourceContainerType[] filterTypes(ISourceContainerType[] types){
ArrayList validTypes = new ArrayList();
- for (int i=0; i< types.length; i++)
- {
- if(SourceLookupUIUtils.getSourceContainerBrowser(types[i].getId()) != null)
- validTypes.add(types[i]);
+ for (int i=0; i< types.length; i++) {
+ ISourceContainerType type = types[i];
+ if (fDirector.supportsSourceContainerType(type)) {
+ if(SourceLookupUIUtils.getSourceContainerBrowser(type.getId()) != null) {
+ validTypes.add(type);
+ }
+ }
}
return (ISourceContainerType[]) validTypes.toArray(new ISourceContainerType[validTypes.size()]);
@@ -158,10 +151,14 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
ISourceContainerBrowser browser = SourceLookupUIUtils.getSourceContainerBrowser(type.getId());
if(browser == null)
super.okPressed();
- ISourceContainer[] results = browser.createSourceContainers(getShell());
+ ISourceContainer[] results = browser.createSourceContainers(getShell(), fConfiguration);
if(results != null)
fSourceContainerViewer.addEntries(results);
super.okPressed();
}
+ protected void addFilter(ViewerFilter filter) {
+ fViewer.addFilter(filter);
+ }
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ISourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ISourceContainerBrowser.java
index 9fb736eba..4acb5e59f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ISourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ISourceContainerBrowser.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.sourcelookup;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.swt.widgets.Shell;
@@ -21,18 +22,18 @@ import org.eclipse.swt.widgets.Shell;
* THIS INTERFACE IS EXPERIMENTAL AND SUBJECT TO CHANGE
* </p>
*
- * TODO: issue - should we use a wizard instead of a dialog for this?
*@see ISourceContainerType
*@since 3.0
*/
public interface ISourceContainerBrowser {
/**
- * Displays a browse dialog and then uses the input to create a source container.
- * If user input is not required, it can just return a new source container without
- * displaying a browse dialog.
- * @param shell the shell to use to display the dialog
- * @return the new source container or containers (if multiple items selected by user)
+ * Creates and returns new source containers for a source container type
+ * the user has selected to add to the given launch configuration.
+ *
+ * @param shell the shell to use to display any dialogs
+ * @param configuration the launch configuration being edited
+ * @return the new source container or containers
*/
- public ISourceContainer[] createSourceContainers(Shell shell);
+ public ISourceContainer[] createSourceContainers(Shell shell, ILaunchConfiguration configuration);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/MultipleSourceSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/MultipleSourceSelectionDialog.java
deleted file mode 100644
index 3ff2ee436..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/MultipleSourceSelectionDialog.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.sourcelookup;
-
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-
-/**
- * Dialog for source selection, in the case that multiple sources were found
- * in the path.
- *
- * @since 3.0
- */
-public class MultipleSourceSelectionDialog extends Dialog {
- private java.util.List fSourceList;
- private int fSelection;
- private Button fOkButton;
- private List fChoiceList;
-
- /**
- * MultipleSourceSelectionDialog constructor.
- * @param shell The parent shell, or <code>null</code> to create top level shell.
- * @param methodName The name of the method being called.
- */
- public MultipleSourceSelectionDialog(
- Shell shell,
- java.util.List sourceList)
- {
- super(shell);
- fSourceList = sourceList;
- }
-
- /**
- * @see Window#configureShell(Shell)
- */
- protected void configureShell(Shell shell)
- {
- super.configureShell(shell);
- shell.setText(SourceLookupUIMessages.getString("multipleSourceDialog.title")); //$NON-NLS-1$
- }
-
- /**
- * @see Window#create()
- */
- public void create() {
- super.create();
- fOkButton.setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- composite.setFont(parent.getFont());
-
- // Label 1: "More than one source was found for ..."
- Label message = new Label(composite, SWT.NULL);
- //String[] substituteText = {fSourceName};
- message.setText(SourceLookupUIMessages.getString("multipleSourceDialog.message")); //$NON-NLS-1$
-
- // Blank space
- new Label(composite, SWT.NULL);
-
- // Label 2: "Select the source to display:"
- Label instruction = new Label(composite, SWT.NULL);
- instruction.setText(SourceLookupUIMessages.getString("multipleSourceDialog.label")); //$NON-NLS-1$
-
- // Create selectionComposite (file list)
- Composite selectionComposite = new Composite(composite, SWT.NONE);
- layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.numColumns = 2;
- selectionComposite.setLayout(layout);
- selectionComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectionComposite.setFont(parent.getFont());
-
- // Create single selection list
- fChoiceList = new List(selectionComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER | SWT.H_SCROLL);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING; //gridData.FILL;
- gridData.verticalAlignment = GridData.BEGINNING;
- gridData.grabExcessHorizontalSpace = true;
- gridData.horizontalSpan = 1;
- gridData.widthHint = convertWidthInCharsToPixels(80);
- gridData.heightHint = convertWidthInCharsToPixels(15);
- fChoiceList.setLayoutData(gridData);
- createSelectionList();
-
- WorkbenchHelp.setHelp(getShell(), IDebugHelpContextIds.MULTIPLE_SOURCE_DIALOG);
- Dialog.applyDialogFont(composite);
- return composite;
- }
-
- /**
- * @see Dialog#createButtonsForButtonBar(Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- fOkButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- fSelection = fChoiceList.getSelectionIndex();
- if (fSelection != -1)
- super.okPressed();
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
- */
- protected void cancelPressed() {
- //TODO user will get standard source not found editor instead of
- //model specific editor, should the debug adapter have one
- fSelection = -1;
- super.cancelPressed();
- }
-
- /**
- * Get the selection in the dialog
- * @return the user's selection
- */
- public Object getSelection() {
- if (fSelection != -1)
- return fSourceList.get(fSelection);
- else
- return null;
- }
-
-
- /**
- * Create a button widget.
- * @param parent The parent composite.
- * @param style The button style.
- * @param label The button label.
- */
- protected Button createButton(Composite parent, int style, String label) {
- Button button = new Button(parent, style);
- button.setText(label);
- return button;
- }
-
- /**
- * Adds the source choices to the list in the dialog.
- */
- private void createSelectionList () {
- String [] sourceStringList;
-
- if (fSourceList != null) {
- sourceStringList = generateSourceElementStringList();
- for (int i = 0; i < fSourceList.size(); i++)
- {
- fChoiceList.add(sourceStringList[i]);
-
- }
- if(fChoiceList.getItemCount() > 0)
- fChoiceList.setSelection(0);
- }
- }
-
- /**
- * Generate a string list of Source Elements for the dialog display
- *
- */
- private String [] generateSourceElementStringList () {
- String[] sourceElementStringList = new String [fSourceList.size()];
-
- for (int i = 0; i < fSourceList.size(); i++) {
- //TODO need a way to get to model presentation? or label provider?
- sourceElementStringList[i] = fSourceList.get(i).toString();
- }
- return sourceElementStringList;
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/Prompter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/Prompter.java
new file mode 100644
index 000000000..e4d0e22d9
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/Prompter.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.sourcelookup;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Prompts the user in the UI (asyncronously), on behalf of a non-UI client,
+ * blocking the calling thread until a response is received.
+ * <p>
+ * This status handler is registered for for the debug UI plug-in,
+ * with a status code of <code>STATUS_HANDLER_PROMPT</code>.
+ * </p>
+ * @since 3.0
+ */
+public class Prompter implements IStatusHandler {
+ /**
+ * Prompts the user for input based on the given status and source
+ * object, blocking the calling thread until the status is resolved.
+ *
+ * @param status client status code for which a status handler must
+ * be registered
+ * @param source object requesting the status to be resolved
+ * @return result of resolving the givne status
+ * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
+ */
+ public Object handleStatus(final IStatus status, final Object source) throws CoreException {
+ final IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
+ if (handler == null) {
+ // TODO: throw exception
+ }
+ Display display = DebugUIPlugin.getStandardDisplay();
+ if (display.getThread().equals(Thread.currentThread())) {
+ return handler.handleStatus(status, source);
+ }
+ final Object[] result = new Object[1];
+ final CoreException[] exception = new CoreException[1];
+ final Object lock = this;
+ Runnable r = new Runnable() {
+ public void run() {
+ try {
+ result[0] = handler.handleStatus(status, source);
+ } catch (CoreException e) {
+ exception[0] = e;
+ }
+ synchronized (lock) {
+ lock.notifyAll();
+ }
+ }
+ };
+ synchronized (lock) {
+ DebugUIPlugin.getStandardDisplay().asyncExec(r);
+ try {
+ lock.wait();
+ } catch (InterruptedException e) {
+ }
+ }
+
+ if (exception[0] != null ) {
+ throw exception[0];
+ }
+ return result[0];
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java
new file mode 100644
index 000000000..88e858067
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.sourcelookup;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+/**
+ * Status handler to prompt for dupicate source element resolution.
+ *
+ * @since 3.0
+ */
+public class ResolveDuplicatesHandler implements IStatusHandler {
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
+ */
+ public Object handleStatus(IStatus status, Object source) throws CoreException {
+ Object[] args = (Object[])source;
+ IStackFrame frame = (IStackFrame) args[0];
+ List sources = (List) args[1];
+ return resolveSourceElement(frame, sources);
+ }
+
+ public Object resolveSourceElement(IStackFrame frame, List sources) {
+ Object file = null;
+ sources = removeSourceNotFoundEditors(sources);
+ if(sources.size() == 1) {
+ return sources.get(0);
+ } else if(sources.size() == 0) {
+ return null;
+ }
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(DebugUIPlugin.getShell(), new WorkbenchLabelProvider());
+ dialog.setMultipleSelection(false);
+ dialog.setTitle(SourceLookupUIMessages.getString("ResolveDuplicatesHandler.0")); //$NON-NLS-1$
+ dialog.setMessage(SourceLookupUIMessages.getString("ResolveDuplicatesHandler.1")); //$NON-NLS-1$
+ dialog.setElements(sources.toArray());
+ dialog.open();
+ if(dialog.getReturnCode() == Window.OK) {
+ file = dialog.getFirstResult();
+ }
+ return file;
+ }
+
+ /**
+ * Remove extra source not found editors, if any.
+ * If multiple source not found editors and no "real" source inputs,
+ * return the first source not found editor.
+ * @param sources the list to be filtered
+ * @return the filtered list, may be empty
+ */
+ private List removeSourceNotFoundEditors(List sources){
+ Iterator iterator = sources.iterator();
+ List filteredList = new ArrayList();
+ Object next;
+ while(iterator.hasNext()) {
+ next = iterator.next();
+ if (!(next instanceof CommonSourceNotFoundEditor)) {
+ filteredList.add(next);
+ }
+ }
+ if (filteredList.isEmpty() && sources.get(0) != null) {
+ filteredList.add(sources.get(0));
+ }
+ return filteredList;
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLabelProvider.java
index 13eddec99..ec8cf31ed 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLabelProvider.java
@@ -10,15 +10,15 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.sourcelookup;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
+import org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.model.WorkbenchLabelProvider;
/**
- * Label provider for source containers.
+ * Label provider for source containers and source container types.
*
* @since 3.0
*/
@@ -29,16 +29,23 @@ public class SourceContainerLabelProvider extends LabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*/
- public Image getImage(Object element) {
- if (element instanceof ISourceContainer) {
- Image image = SourceLookupUIUtils.getSourceContainerImage(((ISourceContainer) element).getType().getId());
- if (image == null && element instanceof IAdaptable) {
- Object object = ((IAdaptable)element).getAdapter(IAdaptable.class);
- image = getWorkbenchLabelProvider().getImage(object);
+ public Image getImage(Object element) {
+ // first allow workbench adapter to provide image
+ Image image = getWorkbenchLabelProvider().getImage(element);
+ if (image == null) {
+ ISourceContainerType type = null;
+ if (element instanceof ISourceContainer) {
+ type = ((ISourceContainer)element).getType();
+ } else if (element instanceof ISourceContainerType) {
+ type = (ISourceContainerType) element;
}
- if (image != null) {
- return image;
+ if (type != null) {
+ // next consult contributed image
+ image = SourceLookupUIUtils.getSourceContainerImage(type.getId());
}
+ }
+ if (image != null) {
+ return image;
}
return super.getImage(element);
}
@@ -47,8 +54,17 @@ public class SourceContainerLabelProvider extends LabelProvider {
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
public String getText(Object element) {
- if (element instanceof ISourceContainer)
- return ((ISourceContainer) element).getName();
+ // first, allo workbench adapter to provide label
+ String label = getWorkbenchLabelProvider().getText(element);
+ if (label == null || label.length() == 0) {
+ if (element instanceof ISourceContainer) {
+ return ((ISourceContainer) element).getName();
+ } else if (element instanceof ISourceContainerType) {
+ return ((ISourceContainerType)element).getName();
+ }
+ } else {
+ return label;
+ }
return super.getText(element);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupPanel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupPanel.java
index c2ab752ff..b45694154 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupPanel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupPanel.java
@@ -23,6 +23,7 @@ import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.sourcelookup.containers.WorkingSetSourceContainer;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.util.IPropertyChangeListener;
@@ -58,6 +59,8 @@ public class SourceContainerLookupPanel extends AbstractLaunchConfigurationTab i
//the director that will be used by the tab to manage/store the containers
protected AbstractSourceLookupDirector fLocator;
+ protected AddContainerAction fAddAction;
+
protected static final String DIALOG_SETTINGS_PREFIX = "sourceTab"; //$NON-NLS-1$
/**
@@ -133,13 +136,13 @@ public class SourceContainerLookupPanel extends AbstractLaunchConfigurationTab i
FontMetrics fontMetrics = gc.getFontMetrics();
gc.dispose();
- SourceContainerAction action = new AddContainerAction();
+ fAddAction = new AddContainerAction();
Button button =
- createPushButton(pathButtonComp, action.getText(), fontMetrics);
- action.setButton(button);
- addAction(action);
+ createPushButton(pathButtonComp, fAddAction.getText(), fontMetrics);
+ fAddAction.setButton(button);
+ addAction(fAddAction);
- action = new RemoveAction();
+ SourceContainerAction action = new RemoveAction();
button =
createPushButton(pathButtonComp, action.getText(), fontMetrics);
action.setButton(button);
@@ -255,9 +258,7 @@ public class SourceContainerLookupPanel extends AbstractLaunchConfigurationTab i
memento = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, (String)null);
type = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null);
if (type == null) {
- // TODO: should the source locator id be API on ILaunchConfigType?
- // TODO: spec this attribute in plug-in XML
- type = configuration.getType().getAttribute("sourceLocatorId"); //$NON-NLS-1$
+ type = configuration.getType().getSourceLocatorId();
}
}catch(CoreException e){
setErrorMessage(e.getMessage());
@@ -299,6 +300,7 @@ public class SourceContainerLookupPanel extends AbstractLaunchConfigurationTab i
fPathViewer.setEntries(locator.getSourceContainers());
fDuplicatesButton.setSelection(locator.isFindDuplicates());
fLocator = locator;
+ fAddAction.setSourceLookupDirector(locator);
setDirty(false);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupTab.java
index 5be81b255..9e1e19867 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLookupTab.java
@@ -36,7 +36,7 @@ import org.eclipse.ui.help.WorkbenchHelp;
public class SourceContainerLookupTab extends AbstractLaunchConfigurationTab {
//the panel displaying the containers
protected SourceContainerLookupPanel fSourceLookupPanel;
-
+
/**
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(Composite)
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementAdapterFactory.java
new file mode 100644
index 000000000..6bf7de1e7
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementAdapterFactory.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.sourcelookup;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * Adapter factory for source elements.
+ *
+ * @since 3.0
+ */
+public class SourceElementAdapterFactory implements IAdapterFactory {
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adapterType.equals(IWorkbenchAdapter.class)) {
+ return new SourceElementWorkbenchAdapter();
+ }
+ return null;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+ return new Class[] {IWorkbenchAdapter.class};
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementWorkbenchAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementWorkbenchAdapter.java
new file mode 100644
index 000000000..513c6c85d
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementWorkbenchAdapter.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.sourcelookup;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.internal.core.sourcelookup.containers.LocalFileStorage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * Workbench adapter for source elements.
+ *
+ * @since 3.0
+ */
+public class SourceElementWorkbenchAdapter implements IWorkbenchAdapter {
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object o) {
+ return null;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
+ */
+ public ImageDescriptor getImageDescriptor(Object object) {
+ return null;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+ */
+ public String getLabel(Object o) {
+ if (o instanceof LocalFileStorage) {
+ LocalFileStorage storage = (LocalFileStorage) o;
+ IPath path = storage.getFullPath();
+ StringBuffer buffer = new StringBuffer();
+ String[] segments = path.segments();
+ if (segments.length > 0) {
+ buffer.append(path.lastSegment());
+ if (segments.length > 1) {
+ buffer.append(" - "); //$NON-NLS-1$
+ if (path.getDevice() != null) {
+ buffer.append(path.getDevice());
+ }
+ for (int i = 0; i < segments.length - 1; i++) {
+ buffer.append(File.separatorChar);
+ buffer.append(segments[i]);
+ }
+ }
+ return buffer.toString();
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
+ */
+ public Object getParent(Object o) {
+ return null;
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
index 2dedc59a2..3e0020432 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
@@ -22,8 +22,8 @@ sourceTab.revertButton = Re&vert
sourceTab.tabTitle = Source
sourceTab.defaultButton = Restore De&fault
-addSourceLocation.title = Add Source Container
-addSourceLocation.description = Add new containers to the source lookup path
+addSourceLocation.title = Add Source
+addSourceLocation.description = Select the type of source to add to the source lookup path
addSourceLocation.addButton = &Add...
addSourceLocation.addButton2 = &Add Source Container...
addSourceLocation.editorMessage = Source file not found.
@@ -44,11 +44,6 @@ sourceSearch.unsupportedError = Unsupported action.
sourceSearch.couldNotSave= Could not save launch configuration.
sourceSearch.initError = Unable to initialize source container.
-multipleSourceDialog.title=Debugger Source Selection
-multipleSourceDialog.message=More than one source was found.
-multipleSourceDialog.label=Select the source to display:
-
-
projectSelection.chooseLabel = Choose &project(s) to add:
projectSelection.selectAllLabel = &Select All
projectSelection.deselectAllLabel = &Deselect All
@@ -93,3 +88,5 @@ defaultContainer.0 = Exception occurred restoring default source container.
sourceLookupPanel.0 = Source Locator associated with this configuration is not an AbstractSourceLookupDirector.
sourceLookupPanel.1 = Error occurred - unable to apply source lookup path changes.
sourceLookupPanel.2 = Unable to initialize - source locator is not associated with launch configuration.
+ResolveDuplicatesHandler.0=Select Source File
+ResolveDuplicatesHandler.1=Choose a source file (? = any character, * = any string)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerBrowser.java
index 4ce75f662..d676965c6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerBrowser.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.sourcelookup.browsers;
import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.core.sourcelookup.containers.DirectorySourceContainer;
import org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser;
@@ -23,9 +24,9 @@ import org.eclipse.swt.widgets.Shell;
public class DirectorySourceContainerBrowser implements ISourceContainerBrowser {
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell)
+ * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell, org.eclipse.debug.core.ILaunchConfiguration)
*/
- public ISourceContainer[] createSourceContainers(Shell shell) {
+ public ISourceContainer[] createSourceContainers(Shell shell, ILaunchConfiguration configuration) {
ISourceContainer[] containers = new ISourceContainer[1];
DirectorySourceContainerDialog dialog = new DirectorySourceContainerDialog(shell);
String result = dialog.getResult();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
index 1a391ddf8..f5496640e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
@@ -13,6 +13,7 @@ package org.eclipse.debug.internal.ui.sourcelookup.browsers;
import java.util.ArrayList;
import org.eclipse.core.resources.IFolder;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.core.sourcelookup.containers.FolderSourceContainer;
import org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser;
@@ -31,9 +32,9 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
public class FolderSourceContainerBrowser implements ISourceContainerBrowser {
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell)
+ * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell, org.eclipse.debug.core.ILaunchConfiguration)
*/
- public ISourceContainer[] createSourceContainers(Shell shell) {
+ public ISourceContainer[] createSourceContainers(Shell shell, ILaunchConfiguration configuration) {
Dialog dialog =new FolderSourceContainerDialog(shell, new WorkbenchLabelProvider(), new WorkbenchContentProvider());
if (dialog.open() == Window.OK) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
index 20132e513..12b576b91 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.core.sourcelookup.containers.ProjectSourceContainer;
import org.eclipse.debug.internal.ui.sourcelookup.BasicContainerContentProvider;
@@ -35,9 +36,9 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
public class ProjectSourceContainerBrowser implements ISourceContainerBrowser {
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell)
+ * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell,org.eclipse.debug.core.ILaunchConfiguration)
*/
- public ISourceContainer[] createSourceContainers(Shell shell) {
+ public ISourceContainer[] createSourceContainers(Shell shell, ILaunchConfiguration configuration) {
Object input = ResourcesPlugin.getWorkspace().getRoot();
IStructuredContentProvider contentProvider=new BasicContainerContentProvider();
ILabelProvider labelProvider = new WorkbenchLabelProvider();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
index caea9bc46..ec349cef2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
@@ -12,6 +12,7 @@ package org.eclipse.debug.internal.ui.sourcelookup.browsers;
import java.util.ArrayList;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser;
import org.eclipse.debug.internal.ui.sourcelookup.containers.WorkingSetSourceContainer;
@@ -29,9 +30,9 @@ import org.eclipse.ui.internal.WorkbenchPlugin;
public class WorkingSetSourceContainerBrowser implements ISourceContainerBrowser {
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell)
+ * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell, org.eclipse.debug.core.ILaunchConfiguration)
*/
- public ISourceContainer[] createSourceContainers(Shell shell) {
+ public ISourceContainer[] createSourceContainers(Shell shell, ILaunchConfiguration configuration) {
ArrayList containers = new ArrayList();
IWorkingSetSelectionDialog dialog = WorkbenchPlugin.getDefault().getWorkingSetManager().createWorkingSetSelectionDialog(shell,true);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkspaceSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkspaceSourceContainerBrowser.java
index 6753dd1a7..452b08736 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkspaceSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkspaceSourceContainerBrowser.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.sourcelookup.browsers;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.internal.core.sourcelookup.containers.WorkspaceSourceContainer;
import org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser;
@@ -23,9 +24,9 @@ import org.eclipse.swt.widgets.Shell;
public class WorkspaceSourceContainerBrowser implements ISourceContainerBrowser {
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell)
+ * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#createSourceContainers(org.eclipse.swt.widgets.Shell, org.eclipse.debug.core.ILaunchConfiguration)
*/
- public ISourceContainer[] createSourceContainers(Shell shell) {
+ public ISourceContainer[] createSourceContainers(Shell shell, ILaunchConfiguration configuration) {
ISourceContainer[] containers = new ISourceContainer[1];
containers[0] = new WorkspaceSourceContainer();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
index d2bb13a54..d85f74bef 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
@@ -790,6 +790,15 @@ public interface IDebugUIConstants {
public static final int STATUS_INVALID_EXTENSION_DEFINITION = 100;
/**
+ * Status code for a status handler that invokes a delegate
+ * status handler asyncronously in the UI thread, and blocks
+ * until the delegate status handler returns.
+ *
+ * @since 3.0
+ */
+ public static final int STATUS_HANDLER_PROMPT = 200;
+
+ /**
* Status code indicating an unexpected internal error.
*/
public static final int INTERNAL_ERROR = 120;

Back to the top