use of org.eclipse.wst.server.core.internal.ServerWorkingCopy in project webtools.servertools by eclipse.
the class NewServerWizardFragment method createChildFragments.
protected void createChildFragments(List<WizardFragment> list) {
if (getTaskModel() == null)
return;
Byte b = getMode();
if (b != null && b.byteValue() == MODE_MANUAL) {
IServerAttributes server = (IServerAttributes) getTaskModel().getObject(TaskModel.TASK_SERVER);
Object runtime = getTaskModel().getObject(TaskModel.TASK_RUNTIME);
if (runtime != null && runtime instanceof IRuntimeWorkingCopy) {
IServerType st = server == null ? null : server.getServerType();
// It should be assumed that the optional runtime fragment is added by the adopter later
if (st != null && st.requiresRuntime()) {
WizardFragment sub = getWizardFragment(((IRuntime) runtime).getRuntimeType().getId());
if (sub != null)
list.add(sub);
}
}
if (server != null) {
if (server.getServerType().hasServerConfiguration() && server instanceof ServerWorkingCopy && runtime instanceof IRuntime) {
ServerWorkingCopy swc = (ServerWorkingCopy) server;
IRuntime runtime1 = (IRuntime) runtime;
if (runtime != null && runtime1.getLocation() != null && !runtime1.getLocation().isEmpty()) {
if (runtimeLocation == null || !runtimeLocation.equals(runtime1.getLocation()))
try {
swc.importRuntimeConfiguration(runtime1, null);
} catch (CoreException ce) {
// ignore
}
runtimeLocation = runtime1.getLocation();
} else
runtimeLocation = null;
}
WizardFragment sub = getWizardFragment(server.getServerType().getId());
if (sub != null) {
list.add(sub);
}
}
} else if (b != null && b.byteValue() == MODE_EXISTING) {
/*if (comp != null) {
IServer server = comp.getServer();
if (server != null)
list.add(new TasksWizardFragment());
}*/
}
}
use of org.eclipse.wst.server.core.internal.ServerWorkingCopy in project webtools.servertools by eclipse.
the class SetServerStartTimeoutCommand method execute.
/**
* Execute the command.
*/
public void execute() {
ServerWorkingCopy swc = (ServerWorkingCopy) server;
oldTime = swc.getStartTimeout();
swc.setStartTimeout(time);
}
use of org.eclipse.wst.server.core.internal.ServerWorkingCopy in project webtools.servertools by eclipse.
the class SetServerStartTimeoutCommand method undo.
/**
* Undo the command.
*/
public void undo() {
ServerWorkingCopy swc = (ServerWorkingCopy) server;
swc.setStartTimeout(oldTime);
}
use of org.eclipse.wst.server.core.internal.ServerWorkingCopy in project webtools.servertools by eclipse.
the class SetServerAutoPublishTimeCommand method undo.
/**
* Undo the command.
*/
public void undo() {
ServerWorkingCopy swc = (ServerWorkingCopy) server;
swc.setAutoPublishTime(oldTime);
}
use of org.eclipse.wst.server.core.internal.ServerWorkingCopy in project webtools.servertools by eclipse.
the class SetServerAutoPublishTimeCommand method execute.
/**
* Execute the command.
*/
public void execute() {
ServerWorkingCopy swc = (ServerWorkingCopy) server;
oldTime = swc.getAutoPublishTime();
swc.setAutoPublishTime(time);
}
Aggregations