Revision 42711 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ProjectExtension.java
ProjectExtension.java | ||
---|---|---|
29 | 29 |
import java.util.ArrayList; |
30 | 30 |
import java.util.Iterator; |
31 | 31 |
import java.util.List; |
32 |
import java.util.Set; |
|
32 | 33 |
import java.util.prefs.Preferences; |
33 | 34 |
|
34 | 35 |
import javax.swing.JOptionPane; |
... | ... | |
57 | 58 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
58 | 59 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
59 | 60 |
import org.gvsig.andami.ui.wizard.UnsavedDataPanel; |
61 |
import org.gvsig.app.ApplicationLocator; |
|
62 |
import org.gvsig.app.ApplicationManager; |
|
60 | 63 |
import org.gvsig.app.project.Project; |
61 | 64 |
import org.gvsig.app.project.ProjectManager; |
62 | 65 |
import org.gvsig.app.project.documents.gui.ProjectWindow; |
... | ... | |
65 | 68 |
import org.gvsig.tools.ToolsLocator; |
66 | 69 |
import org.gvsig.tools.dataTypes.DataTypes; |
67 | 70 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
71 |
import org.gvsig.tools.i18n.I18nManager; |
|
68 | 72 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
69 | 73 |
import org.gvsig.utils.GenericFileFilter; |
70 | 74 |
import org.gvsig.utils.save.AfterSavingListener; |
... | ... | |
328 | 332 |
PluginServices.getMainFrame().setTitle( |
329 | 333 |
PluginServices.getText(this, "sin_titulo")); |
330 | 334 |
|
331 |
} else if (actionCommand.equals("application-project-open")) {
|
|
335 |
} else if (actionCommand.equals("application-project-open")) { |
|
332 | 336 |
if (!askSave()) { |
333 | 337 |
return; |
334 | 338 |
} |
... | ... | |
521 | 525 |
Project project = ProjectManager.getInstance().createProject(); |
522 | 526 |
|
523 | 527 |
project.loadState(file); |
528 |
Set<String> unloadedObjects = project.getUnloadedObjects(); |
|
529 |
if(unloadedObjects!=null && !unloadedObjects.isEmpty()){ |
|
530 |
StringBuilder builder = new StringBuilder(); |
|
531 |
builder.append("Unloaded elements loading the project:\n"); |
|
532 |
Iterator<String> it = unloadedObjects.iterator(); |
|
533 |
while(it.hasNext()){ |
|
534 |
builder.append("\t"); |
|
535 |
builder.append(it.next()); |
|
536 |
builder.append("\n"); |
|
537 |
} |
|
538 |
|
|
539 |
LOG.warn(builder.toString()); |
|
540 |
|
|
541 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
542 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
543 |
|
|
544 |
application.messageDialog( |
|
545 |
i18nManager.getTranslation("_some_project_elements_could_not_be_loaded")+"\n"+ |
|
546 |
i18nManager.getTranslation("_maybe_you_need_to_install_any_plugins")+"\n\n"+ |
|
547 |
i18nManager.getTranslation("_see_error_log_for_more_information"), |
|
548 |
i18nManager.getTranslation("warning"), |
|
549 |
JOptionPane.WARNING_MESSAGE); |
|
550 |
|
|
551 |
} |
|
524 | 552 |
return (Project) project; |
525 | 553 |
} |
526 | 554 |
|
Also available in: Unified diff