diff options
author | Walter Harley | 2005-12-15 02:14:10 +0000 |
---|---|---|
committer | Walter Harley | 2005-12-15 02:14:10 +0000 |
commit | 507b7c588c3d9e37d413e01422694a869f403f8f (patch) | |
tree | ffd8def36a132e7b742acc19d845bee4397d735f /org.eclipse.jdt.apt.ui | |
parent | 52597fb7db7ddfe8d0d19142d700054ae1d908a1 (diff) | |
download | eclipse.jdt.core-507b7c588c3d9e37d413e01422694a869f403f8f.tar.gz eclipse.jdt.core-507b7c588c3d9e37d413e01422694a869f403f8f.tar.xz eclipse.jdt.core-507b7c588c3d9e37d413e01422694a869f403f8f.zip |
wharley - bugzilla 120417, NPE when disabling project specific settings in Factory Path dialog.
Diffstat (limited to 'org.eclipse.jdt.apt.ui')
-rw-r--r-- | org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java index 78411aca92..8ef6f27012 100644 --- a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java +++ b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java @@ -645,22 +645,23 @@ public class FactoryPathConfigurationBlock extends BaseConfigurationBlock { } protected void saveSettings() { - List<FactoryPathEntry> containers; + FactoryPath fp; if ((fJProj != null) && !fBlockControl.isEnabled()) { // We're in a project properties pane but the entire configuration // block control is disabled. That means the per-project settings checkbox // is unchecked. To save that state, we'll delete the settings file. - containers = null; + fp = null; } else { + List<FactoryPathEntry> containers; + Map<FactoryContainer, FactoryPath.Attributes> map; containers = getListContents(); + map = FactoryPathEntry.pathMapFromList(containers); + fp = new FactoryPath(); + fp.setContainers(map); } - Map<FactoryContainer, FactoryPath.Attributes> map = FactoryPathEntry.pathMapFromList(containers); - try { - FactoryPath fp = new FactoryPath(); - fp.setContainers(map); AptConfig.setFactoryPath(fJProj, fp); } catch (CoreException e) { |