use of org.eclipse.wst.server.core.model.RuntimeDelegate in project webtools.servertools by eclipse.
the class GenericServerRuntimeWizardFragment method createName.
private String createName() {
RuntimeDelegate dl = getRuntimeDelegate();
IRuntimeType runtimeType = dl.getRuntime().getRuntimeType();
String name = NLS.bind(GenericServerUIMessages.runtimeName, runtimeType.getName());
IRuntime[] list = ServerCore.getRuntimes();
int suffix = 1;
String suffixName = name;
for (int i = 0; i < list.length; i++) {
if ((list[i].getName().equals(name) || list[i].getName().equals(suffixName)) && !list[i].equals(dl.getRuntime()))
suffix++;
suffixName = name + ' ' + suffix;
}
if (suffix > 1)
return suffixName;
return name;
}
use of org.eclipse.wst.server.core.model.RuntimeDelegate in project webtools.servertools by eclipse.
the class GenericServerRuntimeWizardFragment method isComplete.
/*
* (non-Javadoc)
*
* @see org.eclipse.wst.server.ui.wizard.IWizardFragment#isComplete()
*/
public boolean isComplete() {
RuntimeDelegate runtime = getRuntimeDelegate();
if (runtime == null)
return false;
IStatus status = runtime.validate();
return (status != null && status.isOK());
}
Aggregations