diff options
author | kmoore | 2010-11-11 22:06:23 +0000 |
---|---|---|
committer | kmoore | 2010-11-11 22:06:23 +0000 |
commit | 1d3054671a85738fd8a8bdfa717b0caf609b339c (patch) | |
tree | 07e15409cc2c5849507e92bfa91e0005f334a911 /jpa/plugins/org.eclipse.jpt.ui | |
parent | 99745e67e59acbec34dcddc8ecf64fe2bc14ba81 (diff) | |
download | webtools.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.java | 5 |
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) { |