TwoPaneElementSelector dialog = new TwoPaneElementSelector(getActiveWorkbenchShell(), programLabelProvider, qualifierLabelProvider); dialog.setElements(binList.toArray()); dialog.setTitle(Messages.ProfileLaunchShortcut_Profile); dialog.setMessage(Messages.ProfileLaunchShortcut_Choose_a_local_application); dialog.setUpperListLabel(Messages.ProfileLaunchShortcut_Binaries); dialog.setLowerListLabel(Messages.ProfileLaunchShortcut_Qualifier); dialog.setMultipleSelection(false); if (dialog.open() == Window.OK) { return (IBinary) dialog.getFirstResult();
/** * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) */ protected void configureShell(Shell newShell) { super.configureShell(newShell); }
TwoPaneElementSelector dialog= new TwoPaneElementSelector(fShell, labelProvider, new WorkbenchLabelProvider()); dialog.setLowerListLabel(PropertiesFileEditorMessages.OpenAction_SelectionDialog_details); dialog.setLowerListComparator(new Comparator<Object>() { @Override public int compare(Object o1, Object o2) { dialog.setTitle(PropertiesFileEditorMessages.OpenAction_SelectionDialog_title); dialog.setMessage(PropertiesFileEditorMessages.OpenAction_SelectionDialog_message); dialog.setElements(keyReferences); if (dialog.open() == Window.OK) { Object[] result= dialog.getResult(); if (result != null && result.length == 1) return (KeyReference)result[0];
public int open() { if (types == null) return CANCEL; setElements(types); return super.open(); }
/** * @see org.eclipse.jface.window.Window#open() */ public int open() { IType[] types = getAppletTypes(); if (types == null) { return CANCEL; } setElements(types); return super.open(); }
TwoPaneElementSelector dialog= new TwoPaneElementSelector(fShell, labelProvider, new WorkbenchLabelProvider()); dialog.setLowerListLabel(PropertiesFileEditorMessages.OpenAction_SelectionDialog_details); dialog.setMultipleSelection(false); dialog.setTitle(PropertiesFileEditorMessages.OpenAction_SelectionDialog_title); dialog.setMessage(PropertiesFileEditorMessages.OpenAction_SelectionDialog_message); dialog.setElements(keyReferences); if (dialog.open() == Window.OK) { Object[] result= dialog.getResult(); if (result != null && result.length == 1) return (KeyReference)result[0];
TwoPaneElementSelector dialog= new TwoPaneElementSelector(fShell, labelProvider, new WorkbenchLabelProvider()); dialog.setLowerListLabel(PropertiesFileEditorMessages.OpenAction_SelectionDialog_details); dialog.setLowerListComparator(new Comparator<Object>() { @Override public int compare(Object o1, Object o2) { dialog.setTitle(PropertiesFileEditorMessages.OpenAction_SelectionDialog_title); dialog.setMessage(PropertiesFileEditorMessages.OpenAction_SelectionDialog_message); dialog.setElements(keyReferences); if (dialog.open() == Window.OK) { Object[] result= dialog.getResult(); if (result != null && result.length == 1) return (KeyReference)result[0];
@Override public int open() { MainMethodSearchEngine engine= new MainMethodSearchEngine(); IType[] types; try { types= engine.searchMainMethods(fRunnableContext, fScope, fStyle); } catch (InterruptedException e) { return CANCEL; } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.MainTypeSelectionDialog_errorTitle, e.getMessage()); return CANCEL; } setElements(types); return super.open(); }
protected void configureShell(Shell newShell) { super.configureShell(newShell); }
TwoPaneElementSelector dialog = new TwoPaneElementSelector(getShell(), programLabelProvider, qualifierLabelProvider); dialog.setElements(getBinaryFiles(getCProject())); dialog.setMessage(LaunchMessages.CMainTab_Choose_program_to_run); dialog.setTitle(LaunchMessages.CMainTab_Program_Selection); dialog.setUpperListLabel(LaunchMessages.Launch_common_BinariesColon); dialog.setLowerListLabel(LaunchMessages.Launch_common_QualifierColon); dialog.setMultipleSelection(false); if (dialog.open() == Window.OK) { IBinary binary = (IBinary) dialog.getFirstResult(); fProgText.setText(binary.getResource().getProjectRelativePath() .toString());
public int open() { MainMethodSearchEngine engine= new MainMethodSearchEngine(); IType[] types; try { types= engine.searchMainMethods(fRunnableContext, fScope, fStyle); } catch (InterruptedException e) { return CANCEL; } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.MainTypeSelectionDialog_errorTitle, e.getMessage()); return CANCEL; } setElements(types); return super.open(); }
@Override protected void configureShell(Shell newShell) { super.configureShell(newShell); PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.MAINTYPE_SELECTION_DIALOG); }
TwoPaneElementSelector dialog = new TwoPaneElementSelector(JDIDebugUIPlugin.getActiveWorkbenchShell(), new SourceElementLabelProvider(),new SourceElementQualifierProvider()); dialog.setTitle(DebugUIMessages.JavaUISourceLocator_Select_Source_1); dialog.setMessage(MessageFormat.format(DebugUIMessages.JavaUISourceLocator__Select_the_source_that_corresponds_to__0__2, new String[]{type.getName()})); dialog.setElements(sourceElements); dialog.setMultipleSelection(false); dialog.setUpperListLabel(DebugUIMessages.JavaUISourceLocator__Matching_files__3); dialog.setLowerListLabel(DebugUIMessages.JavaUISourceLocator__Location__4); dialog.open(); Object[] result = dialog.getResult(); if (result == null) { return null;
@Override public int open() { MainMethodSearchEngine engine= new MainMethodSearchEngine(); IType[] types; try { types= engine.searchMainMethods(fRunnableContext, fScope, fStyle); } catch (InterruptedException e) { return CANCEL; } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.MainTypeSelectionDialog_errorTitle, e.getMessage()); return CANCEL; } setElements(types); return super.open(); }
@Override protected void configureShell(Shell newShell) { super.configureShell(newShell); PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.MAINTYPE_SELECTION_DIALOG); }
return super.open();
protected void configureShell(Shell newShell) { super.configureShell(newShell); PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.MAINTYPE_SELECTION_DIALOG); }