use of org.eclipse.wst.server.ui.internal.editor.ServerEditorInput in project webtools.servertools by eclipse.
the class OpenEditorAgainTestCase method testOpenEditor.
public void testOpenEditor() throws Exception {
Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
tagAsSummary("Open Tomcat editor again", dims);
for (int i = 0; i < 5; i++) {
startMeasuring();
IServer server = getFirstServer(getServerTypeId());
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
stopMeasuring();
page.closeEditor(editor, false);
}
commitMeasurements();
assertPerformance();
}
use of org.eclipse.wst.server.ui.internal.editor.ServerEditorInput in project webtools.servertools by eclipse.
the class ServerUIPlugin method editServer.
/**
* Open the given server id with the server editor.
*
* @param serverId
*/
protected static void editServer(String serverId) {
if (serverId == null)
return;
IWorkbenchWindow workbenchWindow = ServerUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
try {
IServerEditorInput input = new ServerEditorInput(serverId);
page.openEditor(input, IServerEditorInput.EDITOR_ID);
} catch (Exception e) {
if (Trace.SEVERE) {
Trace.trace(Trace.STRING_SEVERE, "Error opening server editor", e);
}
}
}
use of org.eclipse.wst.server.ui.internal.editor.ServerEditorInput in project webtools.servertools by eclipse.
the class AbstractOpenEditorTestCase method testOpenEditor.
public void testOpenEditor() throws Exception {
IServer server = getServer();
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
page.closeEditor(editor, false);
releaseServer(server);
}
use of org.eclipse.wst.server.ui.internal.editor.ServerEditorInput in project webtools.servertools by eclipse.
the class AbstractOpenEditorTestCase method testOpenEditor.
public void testOpenEditor() throws Exception {
startMeasuring();
IServer server = getFirstServer(getServerTypeId());
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
stopMeasuring();
commitMeasurements();
assertPerformance();
page.closeEditor(editor, false);
}
Aggregations