Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 390693 | Differences between
and this patch

Collapse All | Expand All

(-)serverui/org/eclipse/wst/server/ui/internal/wizard/fragment/NewRuntimeWizardFragment.java (-2 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2007 IBM Corporation and others.
2
 * Copyright (c) 2003, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 40-45 Link Here
40
40
41
	protected Map<String, WizardFragment> fragmentMap = new HashMap<String, WizardFragment>();
41
	protected Map<String, WizardFragment> fragmentMap = new HashMap<String, WizardFragment>();
42
42
43
	// Storing the NewRuntimeComposite is required to determine if the selected item
44
	// by the user is a valid server runtime
45
	protected NewRuntimeComposite comp;
46
	
43
	public NewRuntimeWizardFragment() {
47
	public NewRuntimeWizardFragment() {
44
		// do nothing
48
		// do nothing
45
	}
49
	}
Lines 58-64 Link Here
58
	 * @see org.eclipse.wst.server.ui.internal.task.WizardTask#getWizardPage()
62
	 * @see org.eclipse.wst.server.ui.internal.task.WizardTask#getWizardPage()
59
	 */
63
	 */
60
	public Composite createComposite(Composite parent, IWizardHandle wizard) {
64
	public Composite createComposite(Composite parent, IWizardHandle wizard) {
61
		return new NewRuntimeComposite(parent, wizard, getTaskModel(), type, version, runtimeTypeId);
65
		comp = new NewRuntimeComposite(parent, wizard, getTaskModel(), type, version, runtimeTypeId);
66
		return comp;
62
	}
67
	}
63
68
64
	public List getChildFragments() {
69
	public List getChildFragments() {
Lines 121-124 Link Here
121
			fragmentMap.put(typeId, fragment);
126
			fragmentMap.put(typeId, fragment);
122
		return fragment;
127
		return fragment;
123
	}
128
	}
129
	
130
	public boolean isComplete(){
131
		// If the selected runtime is invalid, the wizard 
132
		// should not allow the user to press Finish
133
		if (comp.hasValidSelectedRuntime()){
134
			return true;
135
		}
136
		return false;
137
	}	
124
}
138
}
(-)serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewRuntimeComposite.java (-1 / +14 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2011 IBM Corporation and others.
2
 * Copyright (c) 2003, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 202-205 Link Here
202
					c[i].setVisible(visible);
202
					c[i].setVisible(visible);
203
		}
203
		}
204
	}
204
	}
205
	
206
	/**
207
	 * 
208
	 * Determines if the selected runtime is a
209
	 * valid. 
210
	 * 
211
	 */
212
	public boolean hasValidSelectedRuntime(){
213
		if (runtime == null){
214
			return false;
215
		}
216
		return true;
217
	}
205
}
218
}

Return to bug 390693