Author: scabanovich
Date: 2012-01-06 14:21:36 -0500 (Fri, 06 Jan 2012)
New Revision: 37690
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
Log:
JBIDE-10601
https://issues.joss.org/browse/JBIDE-10601
Method EclipseUtil.getCompilationUnit(IFile) should return existing Java element or null.
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2012-01-06
19:20:33 UTC (rev 37689)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2012-01-06
19:21:36 UTC (rev 37690)
@@ -109,6 +109,9 @@
disablePreference();
try {
ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+ if(original == null) {
+ return;
+ }
ICompilationUnit compilationUnit = original.getWorkingCopy(new
NullProgressMonitor());
CompilationUnit cuNode = ASTTools.buildASTRoot(compilationUnit);