01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.wizards;
11:
12: import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
13: import org.eclipse.pde.internal.ui.PDEPlugin;
14: import org.eclipse.pde.internal.ui.PDEUIMessages;
15: import org.eclipse.swt.widgets.Shell;
16: import org.eclipse.ui.dialogs.ElementListSelectionDialog;
17:
18: public class FeatureSelectionDialog extends ElementListSelectionDialog {
19:
20: /**
21: * @param parent
22: * @param renderer
23: */
24: public FeatureSelectionDialog(Shell parent, IFeatureModel[] models,
25: boolean multiSelect) {
26: super (parent, PDEPlugin.getDefault().getLabelProvider());
27: setTitle(PDEUIMessages.FeatureSelectionDialog_title);
28: setMessage(PDEUIMessages.FeatureSelectionDialog_message);
29: setElements(models);
30: setMultipleSelection(multiSelect);
31: PDEPlugin.getDefault().getLabelProvider().connect(this );
32: }
33:
34: public boolean close() {
35: PDEPlugin.getDefault().getLabelProvider().disconnect(this);
36: return super.close();
37: }
38:
39: }
|