Search in sources :

Example 1 with ServerEditorInput

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();
}
Also used : IServer(org.eclipse.wst.server.core.IServer) ServerEditorInput(org.eclipse.wst.server.ui.internal.editor.ServerEditorInput) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) Dimension(org.eclipse.test.performance.Dimension) IEditorPart(org.eclipse.ui.IEditorPart)

Example 2 with ServerEditorInput

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);
        }
    }
}
Also used : IServerEditorInput(org.eclipse.wst.server.ui.internal.editor.IServerEditorInput) ServerEditorInput(org.eclipse.wst.server.ui.internal.editor.ServerEditorInput) IServerEditorInput(org.eclipse.wst.server.ui.internal.editor.IServerEditorInput)

Example 3 with ServerEditorInput

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);
}
Also used : IServer(org.eclipse.wst.server.core.IServer) ServerEditorInput(org.eclipse.wst.server.ui.internal.editor.ServerEditorInput) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) IEditorPart(org.eclipse.ui.IEditorPart)

Example 4 with ServerEditorInput

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);
}
Also used : IServer(org.eclipse.wst.server.core.IServer) ServerEditorInput(org.eclipse.wst.server.ui.internal.editor.ServerEditorInput) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) IEditorPart(org.eclipse.ui.IEditorPart)

Aggregations

ServerEditorInput (org.eclipse.wst.server.ui.internal.editor.ServerEditorInput)4 IEditorPart (org.eclipse.ui.IEditorPart)3 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)3 IServer (org.eclipse.wst.server.core.IServer)3 Dimension (org.eclipse.test.performance.Dimension)1 IServerEditorInput (org.eclipse.wst.server.ui.internal.editor.IServerEditorInput)1