KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > wizards > FeatureSelectionDialog


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.pde.internal.ui.wizards;
13
14 import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
15 import org.eclipse.pde.internal.ui.PDEPlugin;
16 import org.eclipse.pde.internal.ui.PDEUIMessages;
17 import org.eclipse.swt.widgets.Shell;
18 import org.eclipse.ui.dialogs.ElementListSelectionDialog;
19
20 public class FeatureSelectionDialog extends ElementListSelectionDialog {
21
22     /**
23      * @param parent
24      * @param renderer
25      */

26     public FeatureSelectionDialog(Shell parent, IFeatureModel[] models,
27             boolean multiSelect) {
28         super(parent, PDEPlugin.getDefault().getLabelProvider());
29         setTitle(PDEUIMessages.FeatureSelectionDialog_title);
30         setMessage(PDEUIMessages.FeatureSelectionDialog_message);
31         setElements(models);
32         setMultipleSelection(multiSelect);
33         PDEPlugin.getDefault().getLabelProvider().connect(this);
34     }
35
36     public boolean close() {
37         PDEPlugin.getDefault().getLabelProvider().disconnect(this);
38         return super.close();
39     }
40
41 }
42
Popular Tags