use of org.eclipse.wst.server.ui.internal.wizard.fragment.TasksWizardFragment in project jbosstools-openshift by jbosstools.
the class LaunchCDKServerHandler method showNewServerWizard.
/**
* Open the new server wizard.
*
* @param shell a shell
* @param serverTypeId a server runtime type, or null for any type
* @return <code>true</code> if a server was created, or
* <code>false</code> otherwise
*/
public static IServer showNewServerWizard(Shell shell, final String serverTypeId) {
WizardFragment fragment = new WizardFragment() {
@Override
protected void createChildFragments(List<WizardFragment> list) {
list.add(new NewServerWizardFragment(null, serverTypeId));
list.add(WizardTaskUtil.TempSaveRuntimeFragment);
list.add(WizardTaskUtil.TempSaveServerFragment);
list.add(new ModifyModulesWizardFragment());
list.add(new TasksWizardFragment());
list.add(WizardTaskUtil.SaveRuntimeFragment);
list.add(WizardTaskUtil.SaveServerFragment);
list.add(WizardTaskUtil.SaveHostnameFragment);
}
};
TaskWizard wizard = new TaskWizard(Messages.wizNewServerWizardTitle, fragment);
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(shell, wizard);
int ret = (dialog.open());
if (ret == IDialogConstants.OK_ID) {
IServer server = (IServer) wizard.getTaskModel().getObject(TaskModel.TASK_SERVER);
return server;
}
return null;
}
use of org.eclipse.wst.server.ui.internal.wizard.fragment.TasksWizardFragment in project jbosstools-openshift by jbosstools.
the class LaunchCDKServerHandler method showNewServerWizard.
/**
* Open the new server wizard.
*
* @param shell a shell
* @param serverTypeId a server runtime type, or null for any type
* @return <code>true</code> if a server was created, or
* <code>false</code> otherwise
*/
public static IServer showNewServerWizard(Shell shell, final String serverTypeId) {
WizardFragment fragment = new WizardFragment() {
@Override
protected void createChildFragments(List<WizardFragment> list) {
list.add(new NewServerWizardFragment(null, serverTypeId));
list.add(WizardTaskUtil.TempSaveRuntimeFragment);
list.add(WizardTaskUtil.TempSaveServerFragment);
list.add(new ModifyModulesWizardFragment());
list.add(new TasksWizardFragment());
list.add(WizardTaskUtil.SaveRuntimeFragment);
list.add(WizardTaskUtil.SaveServerFragment);
list.add(WizardTaskUtil.SaveHostnameFragment);
}
};
TaskWizard wizard = new TaskWizard(Messages.wizNewServerWizardTitle, fragment);
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(shell, wizard);
int ret = (dialog.open());
if (ret == IDialogConstants.OK_ID) {
IServer server = (IServer) wizard.getTaskModel().getObject(TaskModel.TASK_SERVER);
return server;
}
return null;
}
Aggregations