Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-09-09 13:47:59 -0400
committereutarass2011-09-09 13:47:59 -0400
commit6af4a881a8545dd9099765efa6a87999f85e8c66 (patch)
treef2eb76cb744662c7ac1f7dce2d4e93e1f9580a5f /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse
parentda88b9a9263f5a97b98112dd7a600ffaf331a181 (diff)
downloadorg.eclipse.tcf-6af4a881a8545dd9099765efa6a87999f85e8c66.tar.gz
org.eclipse.tcf-6af4a881a8545dd9099765efa6a87999f85e8c66.tar.xz
org.eclipse.tcf-6af4a881a8545dd9099765efa6a87999f85e8c66.zip
TCF Debugger: fixed: the debugger should never try to lookup source files using partial file names.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java13
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java17
3 files changed, 12 insertions, 36 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java
index a44c736be..b4f54d074 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java
@@ -59,9 +59,16 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
private static final String[] column_ids = {
IPathMap.PROP_SOURCE,
+ IPathMap.PROP_DESTINATION,
IPathMap.PROP_HOST,
IPathMap.PROP_PROTOCOL,
- IPathMap.PROP_DESTINATION,
+ };
+
+ private static final int[] column_size = {
+ 300,
+ 300,
+ 50,
+ 50,
};
private static final String TAB_ID = "org.eclipse.tm.tcf.launch.pathMapTab";
@@ -157,7 +164,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
GridLayout layout = new GridLayout(2, false);
composite.setFont(font);
composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
+ composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 1, 1));
viewer = new TableViewer(composite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
Table table = viewer.getTable();
@@ -173,7 +180,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
for (int i = 0; i < column_ids.length; i++) {
TableColumn c = new TableColumn(table, SWT.NONE, i);
c.setText(column_ids[i]);
- c.setWidth(600 / column_ids.length);
+ c.setWidth(column_size[i]);
editors[i] = new TextCellEditor(table);
}
viewer.setCellEditors(editors);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
index 8b8c4b1d7..cbafcd680 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
@@ -28,7 +28,6 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationListener;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.ISourcePresentation;
@@ -44,7 +43,6 @@ import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupDirector;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupParticipant;
import org.eclipse.tm.internal.tcf.debug.model.ITCFBreakpointListener;
import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpoint;
import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsStatus;
@@ -546,21 +544,7 @@ public class TCFAnnotationManager {
ISourceLocator locator = node.launch.getSourceLocator();
ISourcePresentation presentation = TCFModelPresentation.getDefault();
for (TCFAnnotation a : set) {
- Object source_element = null;
- if (locator instanceof TCFSourceLookupDirector) {
- source_element = ((TCFSourceLookupDirector)locator).getSourceElement(a.area);
- }
- else if (locator instanceof ISourceLookupDirector) {
- // support for foreign (CDT) source locator
- String filename = TCFSourceLookupParticipant.toFileName(a.area);
- if (filename != null) {
- source_element = ((ISourceLookupDirector)locator).getSourceElement(filename);
- if (source_element == null && !filename.equals(a.area.file)) {
- // retry with relative path
- source_element = ((ISourceLookupDirector)locator).getSourceElement(a.area.file);
- }
- }
- }
+ Object source_element = TCFSourceLookupDirector.lookup(locator, a.area);
if (source_element == null) continue;
IEditorInput editor_input = presentation.getEditorInput(source_element);
ITextEditor editor = editors.get(editor_input);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
index 6be8b25e1..491ba1fc7 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
@@ -38,7 +38,6 @@ import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
import org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension;
import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
@@ -1306,21 +1305,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
int line = 0;
if (area != null) {
ISourceLocator locator = getLaunch().getSourceLocator();
- Object source_element = null;
- if (locator instanceof TCFSourceLookupDirector) {
- source_element = ((TCFSourceLookupDirector)locator).getSourceElement(area);
- }
- else if (locator instanceof ISourceLookupDirector) {
- // support for foreign (CDT) source locator
- String filename = TCFSourceLookupParticipant.toFileName(area);
- if (filename != null) {
- source_element = ((ISourceLookupDirector)locator).getSourceElement(filename);
- if (source_element == null && !filename.equals(area.file)) {
- // retry with relative path
- source_element = ((ISourceLookupDirector)locator).getSourceElement(area.file);
- }
- }
- }
+ Object source_element = TCFSourceLookupDirector.lookup(locator, area);
if (source_element != null) {
ISourcePresentation presentation = TCFModelPresentation.getDefault();
editor_input = presentation.getEditorInput(source_element);

Back to the top