Author: timotei
Date: Sat Jun 11 18:25:01 2011
New Revision: 49836

URL: http://svn.gna.org/viewcvs/wesnoth?rev=49836&view=rev
Log:
eclipse plugin: Prefix our plugin classes with 'Wesnoth'

Added:
    
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothActionBarAdvisor.java
      - copied, changed from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java
    trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothApplication.java
      - copied, changed from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java
    
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
      - copied, changed from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java
    
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchWindowAdvisor.java
      - copied, changed from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java
Removed:
    trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java
    
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java
    
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java
    
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java
Modified:
    trunk/utils/java/org.wesnoth/plugin.xml

Modified: trunk/utils/java/org.wesnoth/plugin.xml
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/plugin.xml?rev=49836&r1=49835&r2=49836&view=diff
==============================================================================
--- trunk/utils/java/org.wesnoth/plugin.xml (original)
+++ trunk/utils/java/org.wesnoth/plugin.xml Sat Jun 11 18:25:01 2011
@@ -43,7 +43,7 @@
             thread="main"
             visible="true">
          <run
-               class="org.wesnoth.product.Application">
+               class="org.wesnoth.product.WesnothApplication">
          </run>
       </application>
    </extension>

Removed: trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java?rev=49835&view=auto
==============================================================================
--- trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java 
(original)
+++ trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java 
(removed)
@@ -1,56 +1,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 - 2011 by Timotei Dolean <[email protected]>
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- 
*******************************************************************************/
-package org.wesnoth.product;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.wesnoth.Logger;
-
-public class Application implements IApplication
-{
-       @Override
-       public Object start(IApplicationContext context)
-       {
-               Display display = PlatformUI.createDisplay();
-        Logger.getInstance().startLogger();
-               try {
-                       int returnCode = 
PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
-                       if (returnCode == PlatformUI.RETURN_RESTART)
-                               return IApplication.EXIT_RESTART;
-                       else
-                               return IApplication.EXIT_OK;
-               }
-               catch(Exception e){
-                   Logger.getInstance().logException(e);
-                   return IApplication.EXIT_OK;
-               }
-               finally {
-                       display.dispose();
-               }
-       }
-
-       @Override
-       public void stop()
-       {
-               if (!PlatformUI.isWorkbenchRunning())
-                       return;
-
-               final IWorkbench workbench = PlatformUI.getWorkbench();
-               final Display display = workbench.getDisplay();
-               display.syncExec(new Runnable() {
-                       public void run() {
-                               if (!display.isDisposed())
-                                       workbench.close();
-                       }
-               });
-       }
-}

Removed: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java?rev=49835&view=auto
==============================================================================
--- 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java
 (original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java
 (removed)
@@ -1,121 +1,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 - 2011 by Timotei Dolean <[email protected]>
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- 
*******************************************************************************/
-package org.wesnoth.product;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.wesnoth.Messages;
-
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor
-{
-       private IWorkbenchAction        aboutAction_;
-       private IWorkbenchAction        quitAction_;
-       private IWorkbenchAction        prefAction_;
-       private IWorkbenchAction        newWizardDropDownAction_;
-
-       private List<IWorkbenchAction> coolBarActions_;
-
-       public ApplicationActionBarAdvisor(IActionBarConfigurer configurer)
-       {
-               super(configurer);
-
-               coolBarActions_ = new ArrayList<IWorkbenchAction>();
-       }
-
-       @Override
-       protected void makeActions(IWorkbenchWindow window)
-       {
-               // file menu
-               newWizardDropDownAction_ = 
ActionFactory.NEW_WIZARD_DROP_DOWN.create(window);
-               register(newWizardDropDownAction_);
-               quitAction_ = ActionFactory.QUIT.create(window);
-               register(quitAction_);
-
-               // window menu
-               prefAction_ = ActionFactory.PREFERENCES.create(window);
-               register(prefAction_);
-
-               // help menu
-               aboutAction_ = ActionFactory.ABOUT.create(window);
-               register(aboutAction_);
-
-        coolBarActions_.add(register(ActionFactory.UNDO.create(window)));
-        coolBarActions_.add(register(ActionFactory.REDO.create(window)));
-
-        coolBarActions_.add(register(ActionFactory.SAVE.create(window)));
-        coolBarActions_.add(register(ActionFactory.SAVE_AS.create(window)));
-        coolBarActions_.add(register(ActionFactory.SAVE_ALL.create(window)));
-
-        coolBarActions_.add(register(ActionFactory.COPY.create(window)));
-        coolBarActions_.add(register(ActionFactory.CUT.create(window)));
-        coolBarActions_.add(register(ActionFactory.PASTE.create(window)));
-
-        coolBarActions_.add(register(ActionFactory.FIND.create(window)));
-
-        coolBarActions_.add(register(ActionFactory.BACK.create(window)));
-        
coolBarActions_.add(register(ActionFactory.BACKWARD_HISTORY.create(window)));
-        coolBarActions_.add(register(ActionFactory.FORWARD.create(window)));
-        
coolBarActions_.add(register(ActionFactory.FORWARD_HISTORY.create(window)));
-
-        coolBarActions_.add(register(ActionFactory.PRINT.create(window)));
-       }
-
-       private IWorkbenchAction register(IWorkbenchAction action)
-       {
-           super.register(action);
-           return action;
-       }
-
-       @Override
-       protected void fillCoolBar(ICoolBarManager coolBar)
-       {
-           //IActionBarConfigurer config  = getActionBarConfigurer();
-           //System.out.println(config.toString());
-           for(IWorkbenchAction action : coolBarActions_){
-               coolBar.add(action);
-           }
-       }
-
-       @Override
-       protected void fillMenuBar(IMenuManager menuBar)
-       {
-               MenuManager fileMenu = new 
MenuManager(Messages.ApplicationActionBarAdvisor_0, "wesnoth.file"); 
//$NON-NLS-1$
-               fileMenu.add(newWizardDropDownAction_);
-               fileMenu.add(quitAction_);
-               menuBar.add(fileMenu);
-
-               MenuManager editMenu = new 
MenuManager(Messages.ApplicationActionBarAdvisor_2, 
IWorkbenchActionConstants.M_EDIT);
-               menuBar.add(editMenu);
-
-               // wesnoth
-               menuBar.add(new 
GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
-               MenuManager projectMenu = new 
MenuManager(Messages.ApplicationActionBarAdvisor_3, 
IWorkbenchActionConstants.M_PROJECT);
-               menuBar.add(projectMenu);
-
-               MenuManager windowMenu = new 
MenuManager(Messages.ApplicationActionBarAdvisor_4, 
IWorkbenchActionConstants.M_WINDOW);
-               windowMenu.add(prefAction_);
-               menuBar.add(windowMenu);
-
-               MenuManager helpMenu = new 
MenuManager(Messages.ApplicationActionBarAdvisor_5, "help"); //$NON-NLS-1$
-               helpMenu.add(aboutAction_);
-               menuBar.add(helpMenu);
-       }
-}

Removed: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java?rev=49835&view=auto
==============================================================================
--- 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java
 (original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java
 (removed)
@@ -1,52 +1,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 - 2011 by Timotei Dolean <[email protected]>
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- 
*******************************************************************************/
-package org.wesnoth.product;
-
-import org.eclipse.ui.application.IWorkbenchConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-import org.eclipse.ui.ide.IDE;
-import org.wesnoth.utils.WorkspaceUtils;
-
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisorHack {
-
-       private static final String PERSPECTIVE_ID = 
"org.wesnoth.product.WMLPerspective"; //$NON-NLS-1$
-
-    @Override
-       public WorkbenchWindowAdvisor 
createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
-        return new ApplicationWorkbenchWindowAdvisor(configurer);
-    }
-
-       @Override
-       public String getInitialWindowPerspectiveId() {
-               return PERSPECTIVE_ID;
-       }
-
-       @Override
-       public void initialize(IWorkbenchConfigurer configurer)
-       {
-               super.initialize(configurer);
-               configurer.setSaveAndRestore(true);
-       }
-
-       @Override
-       public void preStartup()
-       {
-               IDE.registerAdapters();
-       }
-
-       @Override
-       public void postStartup()
-       {
-           if (WorkspaceUtils.checkConditions(false) == false)
-        {
-            WorkspaceUtils.setupWorkspace(true);
-        }
-       }
-}

Removed: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java?rev=49835&view=auto
==============================================================================
--- 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java
 (original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java
 (removed)
@@ -1,45 +1,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 - 2011 by Timotei Dolean <[email protected]>
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- 
*******************************************************************************/
-package org.wesnoth.product;
-
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
-    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer 
configurer) {
-        super(configurer);
-    }
-
-    @Override
-       public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer 
configurer) {
-        return new ApplicationActionBarAdvisor(configurer);
-    }
-
-    @Override
-       public void preWindowOpen() {
-       super.preWindowOpen();
-        IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
-        configurer.setShowMenuBar(true);
-        configurer.setShowProgressIndicator(true);
-        configurer.setShowStatusLine(true);
-        configurer.setShowPerspectiveBar(true);
-        configurer.setShowFastViewBars(true);
-        configurer.setShowCoolBar(true);
-    }
-
-    @Override
-    public void postWindowCreate()
-    {
-       super.postWindowCreate();
-       
this.getWindowConfigurer().getWindow().getActivePage().hideActionSet("org.eclipse.ui.run");
 //$NON-NLS-1$
-    }
-}

Copied: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothActionBarAdvisor.java
 (from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java)
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothActionBarAdvisor.java?p2=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothActionBarAdvisor.java&p1=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java&r1=49835&r2=49836&rev=49836&view=diff
==============================================================================
--- 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationActionBarAdvisor.java
 (original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothActionBarAdvisor.java
 Sat Jun 11 18:25:01 2011
@@ -23,7 +23,7 @@
 import org.eclipse.ui.application.IActionBarConfigurer;
 import org.wesnoth.Messages;
 
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor
+public class WesnothActionBarAdvisor extends ActionBarAdvisor
 {
        private IWorkbenchAction        aboutAction_;
        private IWorkbenchAction        quitAction_;
@@ -32,7 +32,7 @@
 
        private List<IWorkbenchAction> coolBarActions_;
 
-       public ApplicationActionBarAdvisor(IActionBarConfigurer configurer)
+       public WesnothActionBarAdvisor(IActionBarConfigurer configurer)
        {
                super(configurer);
 
@@ -118,4 +118,4 @@
                helpMenu.add(aboutAction_);
                menuBar.add(helpMenu);
        }
-}
+}

Copied: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothApplication.java 
(from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java)
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothApplication.java?p2=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothApplication.java&p1=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java&r1=49835&r2=49836&rev=49836&view=diff
==============================================================================
--- trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java 
(original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothApplication.java 
Sat Jun 11 18:25:01 2011
@@ -15,7 +15,7 @@
 import org.eclipse.ui.PlatformUI;
 import org.wesnoth.Logger;
 
-public class Application implements IApplication
+public class WesnothApplication implements IApplication
 {
        @Override
        public Object start(IApplicationContext context)
@@ -23,7 +23,7 @@
                Display display = PlatformUI.createDisplay();
         Logger.getInstance().startLogger();
                try {
-                       int returnCode = 
PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
+                       int returnCode = 
PlatformUI.createAndRunWorkbench(display, new WesnothWorkbenchAdvisor());
                        if (returnCode == PlatformUI.RETURN_RESTART)
                                return IApplication.EXIT_RESTART;
                        else

Copied: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
 (from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java)
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java?p2=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java&p1=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java&r1=49835&r2=49836&rev=49836&view=diff
==============================================================================
--- 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchAdvisor.java
 (original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
 Sat Jun 11 18:25:01 2011
@@ -14,13 +14,13 @@
 import org.eclipse.ui.ide.IDE;
 import org.wesnoth.utils.WorkspaceUtils;
 
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisorHack {
+public class WesnothWorkbenchAdvisor extends WorkbenchAdvisorHack {
 
        private static final String PERSPECTIVE_ID = 
"org.wesnoth.product.WMLPerspective"; //$NON-NLS-1$
 
     @Override
        public WorkbenchWindowAdvisor 
createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
-        return new ApplicationWorkbenchWindowAdvisor(configurer);
+        return new WesnothWorkbenchWindowAdvisor(configurer);
     }
 
        @Override

Copied: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchWindowAdvisor.java
 (from r49835, 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java)
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchWindowAdvisor.java?p2=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchWindowAdvisor.java&p1=trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java&r1=49835&r2=49836&rev=49836&view=diff
==============================================================================
--- 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/ApplicationWorkbenchWindowAdvisor.java
 (original)
+++ 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchWindowAdvisor.java
 Sat Jun 11 18:25:01 2011
@@ -13,15 +13,15 @@
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
+public class WesnothWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 
-    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer 
configurer) {
+    public WesnothWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer 
configurer) {
         super(configurer);
     }
 
     @Override
        public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer 
configurer) {
-        return new ApplicationActionBarAdvisor(configurer);
+        return new WesnothActionBarAdvisor(configurer);
     }
 
     @Override


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to