use of org.eclipse.wst.server.ui.internal.viewers.ServerComposite in project webtools.servertools by eclipse.
the class NewServerComposite method createExistingComposite.
protected void createExistingComposite(Composite comp) {
existingComp = new ServerComposite(comp, new ServerComposite.ServerSelectionListener() {
public void serverSelected(IServer server) {
wizard.setMessage(null, IMessageProvider.NONE);
// check for compatibility
if (server != null && module != null) {
IStatus status = isSupportedModule(server, module);
if (status != null) {
if (status.getSeverity() == IStatus.ERROR) {
wizard.setMessage(status.getMessage(), IMessageProvider.ERROR);
server = null;
} else if (status.getSeverity() == IStatus.WARNING)
wizard.setMessage(status.getMessage(), IMessageProvider.WARNING);
else if (status.getSeverity() == IStatus.INFO)
wizard.setMessage(status.getMessage(), IMessageProvider.INFORMATION);
}
}
if (existingWC != null) {
if (server != null && server.equals(existingWC.getOriginal()))
return;
existingWC = null;
}
if (server != null)
existingWC = server.createWorkingCopy();
updateTaskModel();
}
}, module, launchMode);
existingComp.setIncludeIncompatibleVersions(true);
GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
data.horizontalSpan = 3;
data.heightHint = 150;
existingComp.setLayoutData(data);
}
Aggregations