Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2008-02-12 14:51:19 -0500
committerKen Ryall2008-02-12 14:51:19 -0500
commit732d6ace34e072ee924b11de01c63426c1ccb478 (patch)
tree34b1f6774b8dfa1af656c59d41565a09b2c1ec15
parent4d5369ea9369206e825377c5fcea7d85513437ef (diff)
downloadorg.eclipse.cdt-732d6ace34e072ee924b11de01c63426c1ccb478.tar.gz
org.eclipse.cdt-732d6ace34e072ee924b11de01c63426c1ccb478.tar.xz
org.eclipse.cdt-732d6ace34e072ee924b11de01c63426c1ccb478.zip
Bug 218219
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java9
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/AbsolutePathSourceContainerType.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java1
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.xml1
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AbsolutePathSourceContainerBrowser.java29
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties1
6 files changed, 42 insertions, 1 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
index d6d5e0e5da..996b94a253 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
@@ -107,4 +107,13 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer {
return getSourceContainerType( TYPE_ID );
}
+ public int hashCode() {
+ return TYPE_ID.hashCode();
+ }
+
+ public boolean equals(Object obj) {
+ if (!(obj instanceof AbsolutePathSourceContainer))
+ return false;
+ return true;
+ }
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/AbsolutePathSourceContainerType.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/AbsolutePathSourceContainerType.java
index 2667b2868a..27dd4ecbd1 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/AbsolutePathSourceContainerType.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/AbsolutePathSourceContainerType.java
@@ -23,7 +23,7 @@ public class AbsolutePathSourceContainerType extends AbstractSourceContainerType
}
public String getMemento(ISourceContainer container) throws CoreException {
- return ""; //$NON-NLS-1$
+ return "AbsolutePath"; //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java
index 87b58649e9..e0e316b0c4 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java
@@ -48,6 +48,7 @@ public class CSourceLookupDirector extends AbstractSourceLookupDirector {
fSupportedTypes.add( FolderSourceContainer.TYPE_ID );
fSupportedTypes.add( DirectorySourceContainer.TYPE_ID );
fSupportedTypes.add( MappingSourceContainer.TYPE_ID );
+ fSupportedTypes.add( AbsolutePathSourceContainer.TYPE_ID );
}
/* (non-Javadoc)
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index 5e8f9dff65..6ebc29d6e1 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -1371,6 +1371,7 @@
icon="icons/obj16/mapentry_obj.gif"
id="org.eclipse.cdt.debug.ui.sourceContainerPresentation.mapEntry"/>
<sourceContainerPresentation
+ browserClass="org.eclipse.cdt.debug.internal.ui.sourcelookup.AbsolutePathSourceContainerBrowser "
containerTypeID="org.eclipse.cdt.debug.core.containerType.absolutePath"
icon="icons/obj16/abspath_obj.gif"
id="org.eclipse.cdt.debug.ui.sourceContainerPresentation.absolutePath"/>
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AbsolutePathSourceContainerBrowser.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AbsolutePathSourceContainerBrowser.java
new file mode 100644
index 0000000000..2f7d6781d5
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AbsolutePathSourceContainerBrowser.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.sourcelookup;
+
+import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer;
+import org.eclipse.debug.core.sourcelookup.ISourceContainer;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.debug.ui.sourcelookup.AbstractSourceContainerBrowser;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Adds a absolute path to the source lookup path.
+ */
+public class AbsolutePathSourceContainerBrowser extends AbstractSourceContainerBrowser {
+
+ public ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director) {
+ AbsolutePathSourceContainer absolutePathSourceContainer = new AbsolutePathSourceContainer();
+ return new ISourceContainer[] { absolutePathSourceContainer };
+ }
+
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
index 6f928e318e..8857c97a0f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
@@ -16,6 +16,7 @@ AddSourceContainerDialog.1=Select the type of source to add to the source lookup
DownAction.0=&Down
EditContainerAction.0=&Edit...
MappingSourceContainerBrowser.0=New Mapping
+AbsolutePathSourceContainerBrowser.0=Absolute Path
PathMappingDialog.0=Specify the mapping paths
PathMappingDialog.1=Compilation path:
PathMappingDialog.2=Local file system path:

Back to the top