Java Code Examples for org.eclipse.wst.server.core.IServerWorkingCopy#save()
The following examples show how to use
org.eclipse.wst.server.core.IServerWorkingCopy#save() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BOSWebServerManager.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected IServer configureServer(final IRuntime runtime, final IServerType sType, final IFile file, final IFolder configurationFolder, final IProgressMonitor monitor) throws CoreException { final IServer server = ServerCore.findServer(BONITA_TOMCAT_SERVER_ID); IServerWorkingCopy serverWC = null; if (server != null) { serverWC = server.createWorkingCopy(); } if (serverWC == null) { serverWC = sType.createServer(BONITA_TOMCAT_SERVER_ID, file, runtime, monitor); } serverWC.setServerConfiguration(configurationFolder); serverWC.setAttribute(ITomcatServer.PROPERTY_INSTANCE_DIR, tomcatInstanceLocation); serverWC.setAttribute(ITomcatServer.PROPERTY_DEPLOY_DIR, tomcatInstanceLocation + File.separatorChar + "webapps"); serverWC.setAttribute(START_TIMEOUT, 300); return serverWC.save(true, monitor); }
Example 2
Source File: LocalAppEngineServerDelegateTest.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
private LocalAppEngineServerDelegate getDelegateWithServer() throws CoreException { IServerWorkingCopy serverWorkingCopy = ServerCore.findServerType("com.google.cloud.tools.eclipse.appengine.standard.server") .createServer("testServer", null, null); IRuntimeWorkingCopy runtimeWorkingCopy = ServerCore.findRuntimeType("com.google.cloud.tools.eclipse.appengine.standard.runtime") .createRuntime("testRuntime", null); IRuntime runtime = runtimeWorkingCopy.save(true, null); serverWorkingCopy.setRuntime(runtime); IServer original = serverWorkingCopy.save(true, null); return LocalAppEngineServerDelegate.getAppEngineServer(original); }
Example 3
Source File: LaunchHelper.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
private IServer createServer(IModule[] modules, SubMonitor progress) throws CoreException { IServerType serverType = ServerCore.findServerType(LocalAppEngineServerDelegate.SERVER_TYPE_ID); IServerWorkingCopy serverWorkingCopy = serverType.createServer(null, null, progress.newChild(4)); serverWorkingCopy.modifyModules(modules, null, progress.newChild(4)); return serverWorkingCopy.save(false, progress.newChild(2)); }
Example 4
Source File: ApplyDefaultCQServerValuesFragment.java From aem-eclipse-developer-tools with Apache License 2.0 | 3 votes |
@Override public void performFinish(IProgressMonitor monitor) throws CoreException { IServer server = (IServer) getTaskModel().getObject(TaskModel.TASK_SERVER); if (server instanceof IServerWorkingCopy) { IServerWorkingCopy wc = (IServerWorkingCopy) server; wc.setAttribute(ISlingLaunchpadServer.PROP_PORT, DefaultCQLaunchpadConfiguration.INSTANCE.getPort()); wc.save(true, monitor); } }