Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2016-02-16 09:00:04 +0000
committerAnton Leherbauer2016-02-16 09:01:09 +0000
commitd25a18cdb5565d14ae58125f495e10e1f66b2e76 (patch)
treef240da8e61c95825c1c24d0242e5dabf40b4e98b /plugins
parente0b3f0153328497ff7c9a69c71f04f043df68673 (diff)
downloadorg.eclipse.tcf-d25a18cdb5565d14ae58125f495e10e1f66b2e76.tar.gz
org.eclipse.tcf-d25a18cdb5565d14ae58125f495e10e1f66b2e76.tar.xz
org.eclipse.tcf-d25a18cdb5565d14ae58125f495e10e1f66b2e76.zip
TCF Debugger: Fix compilation error against CDT 9.0
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/StepIntoSelectionLocation.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/StepIntoSelectionLocation.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/StepIntoSelectionLocation.java
index bdda7f2ca..de4af7eff 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/StepIntoSelectionLocation.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/StepIntoSelectionLocation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015 Xilinx, Inc. and others.
+ * Copyright (c) 2015, 2016 Xilinx, Inc. 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
@@ -328,7 +328,7 @@ class StepIntoSelectionLocation {
IASTName astName = (IASTName) declName;
IBinding binding = astName.resolveBinding();
if (binding != null) {
- ITranslationUnit tu = IndexUI.getTranslationUnit(project, astName);
+ ITranslationUnit tu = getTranslationUnit(astName);
if (tu != null) {
IASTFileLocation loc = astName.getFileLocation();
IRegion region = new Region(loc.getNodeOffset(), loc.getNodeLength());
@@ -454,4 +454,13 @@ class StepIntoSelectionLocation {
boolean isValid() {
return request != null && request.getStatus() == null && text_file != null && text_line > 0;
}
+
+ /**
+ * @see IndexUI#getTranslationUnit(IASTName)
+ */
+ private static ITranslationUnit getTranslationUnit(IASTName name) {
+ IASTTranslationUnit astTranslationUnit = name.getTranslationUnit();
+ return astTranslationUnit == null ? null : astTranslationUnit.getOriginatingTranslationUnit();
+ }
+
}

Back to the top