Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java')
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java
index 45890e46573..19080530a4c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java
@@ -92,7 +92,11 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
* @see IMember
*/
public ITranslationUnit getTranslationUnit() {
- return getSourceManipulationInfo().getTranslationUnit();
+ try {
+ return getSourceManipulationInfo().getTranslationUnit();
+ } catch (CModelException e) {
+ return null;
+ }
}
/**
@@ -149,11 +153,11 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
return new SourceManipulationInfo(this);
}
- protected SourceManipulationInfo getSourceManipulationInfo() {
+ protected SourceManipulationInfo getSourceManipulationInfo() throws CModelException {
return (SourceManipulationInfo)getElementInfo();
}
- public boolean isIdentical(SourceManipulation other){
+ public boolean isIdentical(SourceManipulation other) throws CModelException{
return (this.equals(other)
&& (this.getSourceManipulationInfo().hasSameContentsAs(other.getSourceManipulationInfo())));
}

Back to the top