Revision 43113
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/actioninfo/impl/DefaultActionInfoManager.java | ||
---|---|---|
137 | 137 |
this.activeStates = new Properties(); |
138 | 138 |
File home = PluginsLocator.getManager().getApplicationHomeFolder(); |
139 | 139 |
File states = new File(home,"actions-states.properties"); |
140 |
FileInputStream fis = null; |
|
141 |
try { |
|
142 |
fis = new FileInputStream(states); |
|
143 |
this.activeStates.load(fis); |
|
144 |
} catch (Exception ex) { |
|
145 |
logger.warn("Can't load actions states from '"+states.getAbsolutePath()+"'.",ex); |
|
146 |
} finally { |
|
147 |
IOUtils.closeQuietly(fis); |
|
140 |
if( states.exists() ) { |
|
141 |
FileInputStream fis = null; |
|
142 |
try { |
|
143 |
fis = new FileInputStream(states); |
|
144 |
this.activeStates.load(fis); |
|
145 |
} catch (Exception ex) { |
|
146 |
logger.warn("Can't load actions states from '"+states.getAbsolutePath()+"'.",ex); |
|
147 |
} finally { |
|
148 |
IOUtils.closeQuietly(fis); |
|
149 |
} |
|
148 | 150 |
} |
149 | 151 |
} |
150 | 152 |
Boolean active = BooleanUtils.toBooleanObject((String) this.activeStates.getProperty(action.getName(),"true")); |
Also available in: Unified diff