use of org.eclipse.wst.server.core.IServer in project webtools.servertools by eclipse.
the class PublishListenerTestCase method testListener.
public void testListener() {
IPublishListener listener = new IPublishListener() {
public void publishStarted(IServer server) {
// ignore
}
public void publishFinished(IServer server, IStatus status) {
// ignore
}
};
listener.publishStarted(null);
listener.publishFinished(null, null);
}
use of org.eclipse.wst.server.core.IServer in project webtools.servertools by eclipse.
the class ServerLifecycleListenerTestCase method testListener.
public void testListener() {
IServerLifecycleListener listener = new IServerLifecycleListener() {
public void serverAdded(IServer server) {
// ignore
}
public void serverChanged(IServer server) {
// ignore
}
public void serverRemoved(IServer server) {
// ignore
}
};
listener.serverAdded(null);
listener.serverChanged(null);
listener.serverRemoved(null);
}
use of org.eclipse.wst.server.core.IServer in project jbosstools-openshift by jbosstools.
the class ServerAdapterHandler method execute.
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
final IWorkbenchWindow workbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
ISelection selection = UIUtils.getCurrentSelection(event);
IResource selectedResource = UIUtils.getFirstElement(selection, IResource.class);
final IServer openShiftServer = getOpenShiftServer(selectedResource);
if (openShiftServer != null) {
openServersView(openShiftServer, workbenchWindow);
}
return null;
}
use of org.eclipse.wst.server.core.IServer in project jbosstools-openshift by jbosstools.
the class ServerAdapterHandler method openOrCreateServerAdapter.
/**
* Looks for an existing {@link IServer} matching the given {@code resource},
* otherwise, opens the Server Adapter wizard to create a new one.
*
* @param resource
* @param route
* @param connection
* the OpenShift connection
*/
private IServer openOrCreateServerAdapter(final IResource resource, IRoute route, final Connection connection) {
if (resource == null || connection == null) {
return null;
}
final String resourceName = OpenShiftResourceUniqueId.get(resource);
IServer server = OpenShiftServerUtils.findServerForResource(resourceName);
if (server == null) {
server = createServer(resourceName, resource, route, connection);
}
return server;
}
use of org.eclipse.wst.server.core.IServer in project jbosstools-openshift by jbosstools.
the class OpenShiftSubsystemTest method testSubsystemsStandard.
@Test
public void testSubsystemsStandard() throws Exception {
IServer s1 = OpenShiftServerTestUtils.createOpenshift3Server("example", OpenShiftServerBehaviour.PROFILE_OPENSHIFT3);
testOpenshift3Standard(s1);
}
Aggregations