Revision 43913 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/imp/DefaultApplicationManager.java

View differences:

DefaultApplicationManager.java
113 113

  
114 114
    private Version version;
115 115

  
116
	public DefaultApplicationManager() {
117
		epManager = ToolsLocator.getExtensionPointManager();
118
		epManager.add(EPNAME_PREPARE_OPEN_DATASTORE,
119
				"Actions to do when open a DataStore");
120
		epManager.add(EPNAME_PREPARE_OPEN_DATASTOREPARAMETERS,
121
				"Actions to do before open a DataStore with parameters");
122
		epManager.add(EPNAME_PREPARE_OPEN_LAYER,
123
			"Actions to do after create a Layer");
124
		epManager.add(EPNAME_ADD_TABLE_WIZARD,
125
				"Wizards to add new document table");
116
    public DefaultApplicationManager() {
117
        epManager = ToolsLocator.getExtensionPointManager();
118
        epManager.add(EPNAME_PREPARE_OPEN_DATASTORE,
119
                "Actions to do when open a DataStore");
120
        epManager.add(EPNAME_PREPARE_OPEN_DATASTOREPARAMETERS,
121
                "Actions to do before open a DataStore with parameters");
122
        epManager.add(EPNAME_PREPARE_OPEN_LAYER,
123
                "Actions to do after create a Layer");
124
        epManager.add(EPNAME_ADD_TABLE_WIZARD,
125
                "Wizards to add new document table");
126 126

  
127
        version = new Version();
128
	}
127
        try {
128
            version = new Version();
129
        } catch(Exception ex) {
130
            logger.warn("Can't locate application version.");
131
        }
132
    }
129 133

  
130 134
	/* (non-Javadoc)
131 135
	 * @see org.gvsig.appGvSigManager#pepareOpenDataSource(org.gvsig.fmap.dal.DataStore)
......
427 431
		return Launcher.getAndamiConfig().getLocaleLanguage();
428 432
	}
429 433

  
430
	public void message(String message, int message_type) {
431
		MainFrame main = PluginServices.getMainFrame();
432
		main.message(message, message_type);
433
	}
434

  
435 434
	public void messageDialog(String message, String title, int messageType) {
436 435
		MainFrame main = PluginServices.getMainFrame();
437 436
		main.messageDialog(message, title, messageType);
......
518 517
	public File[] showSaveFileDialog(String title, File initialPath) {
519 518
		return showChooserDialog(title, JFileChooser.SAVE_DIALOG, JFileChooser.FILES_ONLY, false, initialPath, null, false);
520 519
	}
520

  
521
        @Override
522
        public void message(String message, int message_type) {
523
		MainFrame main = PluginServices.getMainFrame();
524
                main.message(message, message_type);
525
        }        
521 526
	
522 527
	public String translate(String message, String... args) {
523 528
		return org.gvsig.i18n.Messages.translate(message, args);

Also available in: Unified diff