Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-07-18 15:34:56 -0400
committerDarin Wright2006-07-18 15:34:56 -0400
commitcaec42fe77f0bf62a21979d908d013a5b9c4d715 (patch)
tree1a4e9c4e40cdae5eea5909ca4e5b009d589d8680 /org.eclipse.debug.core
parentecc160d4ede7d5d044f834572e0a3bd1c3d34bcb (diff)
downloadeclipse.platform.debug-caec42fe77f0bf62a21979d908d013a5b9c4d715.tar.gz
eclipse.platform.debug-caec42fe77f0bf62a21979d908d013a5b9c4d715.tar.xz
eclipse.platform.debug-caec42fe77f0bf62a21979d908d013a5b9c4d715.zip
Bug 138877 Unable to locate source when clicking in console
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainer.java15
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java8
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.java2
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.properties1
4 files changed, 24 insertions, 2 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainer.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainer.java
index accf44355..323761576 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainer.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainer.java
@@ -33,7 +33,7 @@ public abstract class AbstractSourceContainer extends PlatformObject implements
private ISourceLookupDirector fDirector;
/**
- * Throws an exception with the given message and underlying exception.
+ * Throws an error exception with the given message and underlying exception.
*
* @param message error message
* @param exception underlying exception, or <code>null</code>
@@ -44,6 +44,19 @@ public abstract class AbstractSourceContainer extends PlatformObject implements
throw new CoreException(status);
}
+ /**
+ * Throws a warning exception with the given message and underlying exception.
+ *
+ * @param message error message
+ * @param exception underlying exception, or <code>null</code>
+ * @throws CoreException
+ * @since 3.3
+ */
+ protected void warn(String message, Throwable exception) throws CoreException {
+ IStatus status = new Status(IStatus.WARNING, DebugPlugin.getUniqueIdentifier(), DebugPlugin.INTERNAL_ERROR, message, exception);
+ throw new CoreException(status);
+ }
+
/* (non-Javadoc)
*
* By default, do nothing. Subclasses should override as required.
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java
index 9dc779bbe..3fe6e3332 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.debug.core.sourcelookup.containers;
+import java.io.File;
import java.io.IOException;
import com.ibm.icu.text.MessageFormat;
import java.util.ArrayList;
@@ -198,7 +199,12 @@ public class ExternalArchiveSourceContainer extends AbstractSourceContainer {
try {
return SourceLookupUtils.getZipFile(fArchivePath);
} catch (IOException e) {
- abort(MessageFormat.format(SourceLookupMessages.ExternalArchiveSourceContainer_2, new String[]{fArchivePath}), e);
+ File file = new File(fArchivePath);
+ if (file.exists()) {
+ abort(MessageFormat.format(SourceLookupMessages.ExternalArchiveSourceContainer_2, new String[]{fArchivePath}), e);
+ } else {
+ warn(MessageFormat.format(SourceLookupMessages.ExternalArchiveSourceContainer_1, new String[]{fArchivePath}), e);
+ }
}
return null;
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.java
index 267cf4b9d..97c32c459 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.java
@@ -22,6 +22,8 @@ public class SourceLookupMessages extends NLS {
public static String AbstractSourceLookupDirector_19;
public static String CompositeSourceContainer_0;
+ public static String ExternalArchiveSourceContainer_1;
+
public static String ExternalArchiveSourceContainer_2;
public static String ExternalArchiveSourceContainerType_10;
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.properties
index fdc9e4b9b..3182ee111 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.properties
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupMessages.properties
@@ -18,6 +18,7 @@ AbstractSourceLookupDirector_10=Exception occurred during source lookup
CompositeSourceContainer_0=Source lookup error
ExternalArchiveSourceContainer_2=Unable to access archive {0}
+ExternalArchiveSourceContainer_1=Archive does not exist: {0}
ExternalArchiveSourceContainerType_10=Invalid or missing <path> attribute in archive memento.
ExternalArchiveSourceContainerType_11=Missing <archive> node in archive memento.

Back to the top