1 11 package org.eclipse.pde.internal.ui.editor.plugin; 12 13 import java.util.Vector ; 14 15 import org.eclipse.jdt.core.IJavaProject; 16 import org.eclipse.jface.viewers.ILabelProvider; 17 import org.eclipse.pde.internal.core.util.PDEJavaHelper; 18 import org.eclipse.pde.internal.ui.PDEUIMessages; 19 import org.eclipse.swt.widgets.Composite; 20 import org.eclipse.swt.widgets.Control; 21 import org.eclipse.swt.widgets.Shell; 22 import org.eclipse.ui.dialogs.ElementListSelectionDialog; 23 24 public class PackageSelectionDialog extends ElementListSelectionDialog { 25 26 30 public PackageSelectionDialog(Shell parent, ILabelProvider renderer, IJavaProject jProject, Vector existingPackages, boolean allowJava) { 31 super(parent, renderer); 32 setElements(PDEJavaHelper.getPackageFragments(jProject, existingPackages, allowJava)); 34 setMultipleSelection(true); 35 setMessage(PDEUIMessages.PackageSelectionDialog_label); 36 } 37 38 41 protected Control createDialogArea(Composite parent) { 42 Control control = super.createDialogArea(parent); 43 getShell().setText(PDEUIMessages.PackageSelectionDialog_title); 44 return control; 45 } 46 } 47 | Popular Tags |