public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginHeight = 0;
    layout.marginWidth = 5;
    container.setLayout(layout);

    tablePart.createControl(container);

    pluginListViewer = tablePart.getTableViewer();
    pluginListViewer.setContentProvider(new BuildpathContentProvider());
    pluginListViewer.setLabelProvider(MDEPlugin.getDefault().getLabelProvider());

    GridData gd = (GridData) tablePart.getControl().getLayoutData();
    gd.heightHint = 300;
    gd.widthHint = 300;

    pluginListViewer.setInput(MDEPlugin.getDefault());
    if (fSelected != null && fSelected.length > 0) {
      tablePart.setSelection(fSelected);
    }
    setControl(container);
    Dialog.applyDialogFont(container);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.UPDATE_CLASSPATH);
  }
コード例 #2
0
 /** @param elementInfo */
 public static int getCounterValue(ISchemaElement elementInfo) {
   Hashtable counters = MDEPlugin.getDefault().getDefaultNameCounters();
   String counterKey = getCounterKey(elementInfo);
   Integer counter = (Integer) counters.get(counterKey);
   if (counter == null) {
     counter = new Integer(1);
   } else counter = new Integer(counter.intValue() + 1);
   counters.put(counterKey, counter);
   return counter.intValue();
 }
 public NewLibraryPluginCreationUpdateRefPage(
     LibraryPluginFieldData data, Collection initialJarPaths, Collection selection) {
   super("UpdateReferences"); // $NON-NLS-1$
   setTitle(MDEUIMessages.UpdateBuildpathWizard_title);
   setDescription(MDEUIMessages.UpdateBuildpathWizard_desc);
   computeUnmigrated();
   computeSelected(selection);
   fData = data;
   tablePart = new TablePart(MDEUIMessages.UpdateBuildpathWizard_availablePlugins);
   MDEPlugin.getDefault().getLabelProvider().connect(this);
 }