1 11 12 package org.eclipse.jdt.internal.ui.wizards.buildpaths; 13 14 import org.eclipse.core.runtime.IStatus; 15 16 import org.eclipse.swt.SWT; 17 import org.eclipse.swt.layout.GridData; 18 import org.eclipse.swt.widgets.Composite; 19 import org.eclipse.swt.widgets.Control; 20 import org.eclipse.swt.widgets.Shell; 21 22 import org.eclipse.jface.dialogs.StatusDialog; 23 24 import org.eclipse.jdt.core.IClasspathEntry; 25 26 import org.eclipse.jdt.internal.ui.preferences.NativeLibrariesConfigurationBlock; 27 import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener; 28 import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; 29 30 33 public class NativeLibrariesDialog extends StatusDialog { 34 35 private final NativeLibrariesConfigurationBlock fConfigurationBlock; 36 37 public NativeLibrariesDialog(Shell parent, String nativeLibPath, IClasspathEntry parentEntry) { 38 super(parent); 39 setTitle(NewWizardMessages.NativeLibrariesDialog_title); 40 41 setShellStyle(getShellStyle() | SWT.RESIZE); 42 43 IStatusChangeListener listener= new IStatusChangeListener() { 44 public void statusChanged(IStatus status) { 45 updateStatus(status); 46 } 47 }; 48 49 fConfigurationBlock= new NativeLibrariesConfigurationBlock(listener, parent, nativeLibPath, parentEntry); 50 setHelpAvailable(false); 51 } 52 53 56 protected Control createDialogArea(Composite parent) { 57 Composite composite= (Composite) super.createDialogArea(parent); 58 Control inner= fConfigurationBlock.createContents(composite); 59 inner.setLayoutData(new GridData(GridData.FILL_BOTH)); 60 applyDialogFont(composite); 61 return composite; 62 } 63 64 public String getNativeLibraryPath() { 65 return fConfigurationBlock.getNativeLibraryPath(); 66 } 67 68 } 69 | Popular Tags |