-
Notifications
You must be signed in to change notification settings - Fork 43
Error Log View
Vlado Pakan edited this page Aug 23, 2013
·
7 revisions
- WorkbenchPart / View / WorkbenchView
- implements ReferencedComposite
Instantiate Servers View
ServersView serversView = new ServersView();
Open Servers View
serversView.open();
Add server
NewServerWizardDialog wizardDialog = serversView.newServer();
NewServerWizardPage newServerPage = wizardDialog.getFirstPage();
newServerPage.selectType("Basic","HTTP Server");
newServerPage.setName("TestHTTPServer");
wizardDialog.finish();
Get server by name
Server server = serversView.getServer("TestHTTPServer");
Get all defined servers
List<Server> servers = serversView.getServers();
Manage server
To manage particular server Server class can be used
Server server = serversView.getServer("TestHTTPServer");
server.restart();
Get server status
To get particulart server status ServerLabel class can be used
ServerLabel serverLabel = serversView.getServer("TestHTTPServer").getLabel();
ServerState serverState = serverLabel.getState();
ServerPublishState serverPublishState = serverLabel.getPublishState();