Author: timotei
Date: Thu Apr 28 19:01:43 2011
New Revision: 49333

URL: http://svn.gna.org/viewcvs/wesnoth?rev=49333&view=rev
Log:
eclipse plugin: Add the ErrorLog view
and also log any exceptions encountered
in the product running time rather
than silently ignore them

Modified:
    trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java
    trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java

Modified: 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=49333&r1=49332&r2=49333&view=diff
==============================================================================
--- trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java 
(original)
+++ trunk/utils/java/org.wesnoth/src/org/wesnoth/product/Application.java Thu 
Apr 28 19:01:43 2011
@@ -13,20 +13,27 @@
 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) throws Exception
+       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;
-               } finally {
+               }
+               catch(Exception e){
+                   Logger.getInstance().logException(e);
+                   return IApplication.EXIT_OK;
+               }
+               finally {
                        display.dispose();
                }
        }
@@ -36,6 +43,7 @@
        {
                if (!PlatformUI.isWorkbenchRunning())
                        return;
+
                final IWorkbench workbench = PlatformUI.getWorkbench();
                final Display display = workbench.getDisplay();
                display.syncExec(new Runnable() {

Modified: 
trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java?rev=49333&r1=49332&r2=49333&view=diff
==============================================================================
--- trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java 
(original)
+++ trunk/utils/java/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java 
Thu Apr 28 19:01:43 2011
@@ -41,6 +41,7 @@
         bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
         bottom.addView(IPageLayout.ID_PROGRESS_VIEW);
         bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
+        bottom.addView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
 
         IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, 
0.68f, editorArea); //$NON-NLS-1$
         right.addView(IPageLayout.ID_OUTLINE);


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

Reply via email to