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); }
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); }
private void computeUnmigrated() { IMonitorModelBase[] models = MonitorRegistry.getWorkspaceModels(); ArrayList modelArray = new ArrayList(); try { for (int i = 0; i < models.length; i++) { if (models[i].getUnderlyingResource().getProject().hasNature(JavaCore.NATURE_ID)) modelArray.add(models[i]); } } catch (CoreException e) { MDEPlugin.logException(e); } fUnmigrated = (IMonitorModelBase[]) modelArray.toArray(new IMonitorModelBase[modelArray.size()]); }