All pastes #958459 Raw Edit

Anonymous

public text v1 · immutable
#958459 ·published 2008-03-26 19:09 UTC
rendered paste body
    static public RunningScriptsView getView() {
    	IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		
		if (instance != null)
		{
			page.activate(instance);
			return instance;
		}
		
		// none of the already created views match, create a new one
		try {
			instance = (RunningScriptsView) page.showView(VIEW_ID);
			page.activate(instance);
			return instance;
		} catch (PartInitException e) {
			e.printStackTrace();
		}	
		return null;
    }