1 24 package org.objectweb.dolphin.rcp; 25 26 import org.eclipse.core.runtime.IPlatformRunnable; 27 import org.eclipse.swt.widgets.Display; 28 import org.eclipse.ui.PlatformUI; 29 import org.eclipse.ui.application.WorkbenchAdvisor; 30 import org.objectweb.dolphin.resources.DolphinResourcesManagment; 31 32 36 public class DolphinApplication implements IPlatformRunnable { 37 38 41 public Object run(Object args) { 42 43 DolphinResourcesManagment.createConfiguration(); 45 46 WorkbenchAdvisor workbenchAdvisor = new DolphinWorkbenchAdvisor(); 47 Display display = PlatformUI.createDisplay(); 48 try { 49 int returnCode = PlatformUI.createAndRunWorkbench(display, 50 workbenchAdvisor); 51 if (returnCode == PlatformUI.RETURN_RESTART) { 52 return IPlatformRunnable.EXIT_RESTART; 53 } 54 return IPlatformRunnable.EXIT_OK; 55 } finally { 56 display.dispose(); 57 } 58 } 59 } | Popular Tags |