Revision 37546 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/extension/ProjectExtension.java
ProjectExtension.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import javax.swing.JOptionPane; |
33 | 33 |
|
34 |
import org.slf4j.Logger; |
|
35 |
import org.slf4j.LoggerFactory; |
|
36 |
|
|
34 | 37 |
import org.gvsig.andami.Launcher; |
35 | 38 |
import org.gvsig.andami.Launcher.TerminationProcess; |
36 | 39 |
import org.gvsig.andami.PluginServices; |
... | ... | |
65 | 68 |
* @author Fernando Gonz?lez Cort?s |
66 | 69 |
*/ |
67 | 70 |
public class ProjectExtension extends Extension implements IExtensionStatus { |
68 |
|
|
71 |
private static final Logger LOG = |
|
72 |
LoggerFactory.getLogger(ProjectExtension.class); |
|
73 |
|
|
69 | 74 |
private static String projectPath = null; |
70 | 75 |
private ProjectWindow projectFrame; |
71 | 76 |
private Project p; |
... | ... | |
263 | 268 |
"Save_the_selected_resources_and_close_current_project")); |
264 | 269 |
panel.setCancelText(PluginServices.getText(this, "Dont_close"), |
265 | 270 |
PluginServices.getText(this, "Return_to_current_project")); |
266 |
int closeCurrProj = process.manageUnsavedData(); |
|
267 |
if (closeCurrProj == JOptionPane.NO_OPTION) { |
|
268 |
// the user chose to return to current project |
|
269 |
return false; |
|
270 |
} |
|
271 |
int closeCurrProj; |
|
272 |
try { |
|
273 |
closeCurrProj = process.manageUnsavedData(); |
|
274 |
if (closeCurrProj == JOptionPane.NO_OPTION) { |
|
275 |
// the user chose to return to current project |
|
276 |
return false; |
|
277 |
} |
|
278 |
} catch (Exception e) { |
|
279 |
LOG.error("Some data can not be saved", e); |
|
280 |
} |
|
271 | 281 |
} |
272 | 282 |
return true; |
273 | 283 |
} |
Also available in: Unified diff