create new branch webapp
[taxeditor.git] / eu.etaxonomy.taxeditor.application / src / main / java / eu / etaxonomy / taxeditor / ApplicationWorkbenchWindowAdvisor.java
index 04ca7b60995411e5e20c3ab5a96642bd59be4a44..773cfc736cb602494e8ecf098a7aff15a849be68 100644 (file)
@@ -14,15 +14,11 @@ import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 import org.eclipse.ui.internal.WorkbenchWindow;
 
-import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.handler.update.P2Util;
 import eu.etaxonomy.taxeditor.util.ApplicationUtil;
 
 /**
- *
  * @author n.hoffmann
- * @version $Id: $
  */
 public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 
@@ -39,14 +35,14 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
        @Override
     public void preWindowOpen() {
                IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
-               configurer.setInitialSize(new Point(963, 637));
+               configurer.setInitialSize(new Point(1280, 720));
                configurer.setShowCoolBar(true);
                configurer.setShowStatusLine(true);
                configurer.setShowPerspectiveBar(true);
                configurer.setTitle(ApplicationUtil.getTitle());
                configurer.setShowProgressIndicator(true);
 
-               CdmDataSourceRepository.createDefaultH2DataSource();
+//             CdmDataSourceRepository.createDefaultH2DataSource();
        }
 
        @Override
@@ -64,15 +60,17 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
                        }
                    }
                }
-
-        }
-               PreferencesUtil.checkNomenclaturalCode();
-
-               if(PreferencesUtil.shouldConnectAtStartUp()) {
-            CdmStore.connect();
         }
 
+           P2Util.setP2UpdateRepositories();
+//      TODO: think about how to implement this with
+//         if(PreferencesUtil.shouldConnectAtStartUp()) {
+//                 CdmStore.connect();
+//        }
        }
 
-}
-
+       @Override
+    public void postWindowClose() {
+        P2Util.saveP2RepositoryPreferences();
+    }
+}
\ No newline at end of file