testing: DLTKTestingPlugin.showTestRunnerViewPartInActivePage() method introduced
diff --git a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/DLTKTestingModel.java b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/DLTKTestingModel.java
index 95dbbfe..e53a9e5 100755
--- a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/DLTKTestingModel.java
+++ b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/DLTKTestingModel.java
@@ -154,7 +154,7 @@
 
 		private void connectTestRunner(ILaunch launch,
 				IScriptProject javaProject) {
-			showTestRunnerViewPartInActivePage(findTestRunnerViewPartInActivePage());
+			showTestRunnerViewPartInActivePage();
 			limitSessionHistory();
 			addTestRunSession(new TestRunSession(launch, javaProject,
 					new RemoteTestRunnerClient()));
@@ -162,7 +162,7 @@
 
 		private void connectTestRunner(ILaunch launch,
 				IScriptProject javaProject, int port) {
-			showTestRunnerViewPartInActivePage(findTestRunnerViewPartInActivePage());
+			showTestRunnerViewPartInActivePage();
 			limitSessionHistory();
 			addTestRunSession(new TestRunSession(launch, javaProject,
 					new SocketTestRunnerClient(port)));
@@ -183,39 +183,6 @@
 			}
 		}
 
-		private TestRunnerViewPart showTestRunnerViewPartInActivePage(
-				TestRunnerViewPart testRunner) {
-			IWorkbenchPart activePart = null;
-			IWorkbenchPage page = null;
-			try {
-				// TODO: have to force the creation of view part contents
-				// otherwise the UI will not be updated
-				if (testRunner != null && testRunner.isCreated())
-					return testRunner;
-				page = DLTKTestingPlugin.getActivePage();
-				if (page == null)
-					return null;
-				activePart = page.getActivePart();
-				// show the result view if it isn't shown yet
-				return (TestRunnerViewPart) page
-						.showView(TestRunnerViewPart.NAME);
-			} catch (PartInitException pie) {
-				DLTKTestingPlugin.log(pie);
-				return null;
-			} finally {
-				// restore focus stolen by the creation of the result view
-				if (page != null && activePart != null)
-					page.activate(activePart);
-			}
-		}
-
-		private TestRunnerViewPart findTestRunnerViewPartInActivePage() {
-			IWorkbenchPage page = DLTKTestingPlugin.getActivePage();
-			if (page == null)
-				return null;
-			return (TestRunnerViewPart) page.findView(TestRunnerViewPart.NAME);
-		}
-
 		private Display getDisplay() {
 			// Shell shell= getActiveWorkbenchShell();
 			// if (shell != null) {
@@ -229,6 +196,42 @@
 		}
 	}
 
+	public TestRunnerViewPart showTestRunnerViewPartInActivePage() {
+		return showTestRunnerViewPartInActivePage(findTestRunnerViewPartInActivePage());
+	}
+
+	private TestRunnerViewPart showTestRunnerViewPartInActivePage(
+			TestRunnerViewPart testRunner) {
+		IWorkbenchPart activePart = null;
+		IWorkbenchPage page = null;
+		try {
+			// TODO: have to force the creation of view part contents
+			// otherwise the UI will not be updated
+			if (testRunner != null && testRunner.isCreated())
+				return testRunner;
+			page = DLTKTestingPlugin.getActivePage();
+			if (page == null)
+				return null;
+			activePart = page.getActivePart();
+			// show the result view if it isn't shown yet
+			return (TestRunnerViewPart) page.showView(TestRunnerViewPart.NAME);
+		} catch (PartInitException pie) {
+			DLTKTestingPlugin.log(pie);
+			return null;
+		} finally {
+			// restore focus stolen by the creation of the result view
+			if (page != null && activePart != null)
+				page.activate(activePart);
+		}
+	}
+
+	private TestRunnerViewPart findTestRunnerViewPartInActivePage() {
+		IWorkbenchPage page = DLTKTestingPlugin.getActivePage();
+		if (page == null)
+			return null;
+		return (TestRunnerViewPart) page.findView(TestRunnerViewPart.NAME);
+	}
+
 	public static IScriptProject getScriptProject(
 			ILaunchConfiguration configuration) {
 		try {
@@ -491,17 +494,17 @@
 	private static void throwExportError(File file, Exception e)
 			throws CoreException {
 		throw new CoreException(new org.eclipse.core.runtime.Status(
-				IStatus.ERROR, DLTKTestingPlugin.getPluginId(), Messages
-						.format(ModelMessages.JUnitModel_could_not_write, file
-								.getAbsolutePath()), e));
+				IStatus.ERROR, DLTKTestingPlugin.getPluginId(),
+				Messages.format(ModelMessages.JUnitModel_could_not_write,
+						file.getAbsolutePath()), e));
 	}
 
 	private static void throwImportError(File file, Exception e)
 			throws CoreException {
 		throw new CoreException(new org.eclipse.core.runtime.Status(
-				IStatus.ERROR, DLTKTestingPlugin.getPluginId(), Messages
-						.format(ModelMessages.JUnitModel_could_not_read, file
-								.getAbsolutePath()), e));
+				IStatus.ERROR, DLTKTestingPlugin.getPluginId(),
+				Messages.format(ModelMessages.JUnitModel_could_not_read,
+						file.getAbsolutePath()), e));
 	}
 
 	/**
diff --git a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/testing/DLTKTestingPlugin.java b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/testing/DLTKTestingPlugin.java
index 7ec6348..0c5f6b8 100755
--- a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/testing/DLTKTestingPlugin.java
+++ b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/testing/DLTKTestingPlugin.java
@@ -32,6 +32,7 @@
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -279,4 +280,8 @@
 	public static ITestRunSession getTestRunSession(ILaunch launch) {
 		return getModel().getTestRunSession(launch);
 	}
+
+	public static IViewPart showTestRunnerViewPartInActivePage() {
+		return getDefault().fTestingModel.showTestRunnerViewPartInActivePage();
+	}
 }