Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2010-11-11 22:06:23 +0000
committerkmoore2010-11-11 22:06:23 +0000
commit1d3054671a85738fd8a8bdfa717b0caf609b339c (patch)
tree07e15409cc2c5849507e92bfa91e0005f334a911 /jpa/plugins/org.eclipse.jpt.ui
parent99745e67e59acbec34dcddc8ecf64fe2bc14ba81 (diff)
downloadwebtools.dali-1d3054671a85738fd8a8bdfa717b0caf609b339c.tar.gz
webtools.dali-1d3054671a85738fd8a8bdfa717b0caf609b339c.tar.xz
webtools.dali-1d3054671a85738fd8a8bdfa717b0caf609b339c.zip
added null check on primaryType, this can be null for a compilation unit
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.ui')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/MakePersistentAction.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/MakePersistentAction.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/MakePersistentAction.java
index 7fcc503f65..b51bc9aea9 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/MakePersistentAction.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/MakePersistentAction.java
@@ -87,7 +87,10 @@ public class MakePersistentAction implements IObjectActionDelegate {
}
private void addSelectedType(ICompilationUnit compilationUnit, Map<IProject, List<IType>> types) {
- addSelectedType(getPrimaryType(compilationUnit), types);
+ IType primaryType = this.getPrimaryType(compilationUnit);
+ if (primaryType != null) {
+ this.addSelectedType(primaryType, types);
+ }
}
private void addSelectedType(IType primaryType, Map<IProject, List<IType>> typesMap) {

Back to the top