/**
* This updates the runtime.
*/
private void updateRuntime() {
IRuntimeWorkingCopy workingCopy = getRuntimeWorkingCopy();
if (workingCopy != null) {
// workCopy will be instance of ServerDelegate classs.
// We need to get the params, so IKarafRuntime will be enough.
IKarafRuntimeWorkingCopy karafRuntimeWorkingCopy = (IKarafRuntimeWorkingCopy) workingCopy
.loadAdapter(IKarafRuntimeWorkingCopy.class,
new NullProgressMonitor());
if (karafRuntimeWorkingCopy != null) {
String installDir = model.getKarafInstallDir();
IPath path = new Path(installDir);
workingCopy.setLocation(path);
}
}
try {
workingCopy.save(true, new NullProgressMonitor());
} catch (CoreException e) {
Activator.getLogger().error(e);
}
}