public static IJavaProject chooseGW4EProject(IJavaProject javaProject) { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); IJavaProject[] projects = getGW4EProjects(); ILabelProvider labelProvider = new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setTitle(MessageUtil.getString("projectdialog_title")); dialog.setMessage(MessageUtil.getString("projectdialog_message")); dialog.setElements(projects); if (javaProject != null) { dialog.setInitialSelections(new Object[] { javaProject }); } if (dialog.open() == Window.OK) { return (IJavaProject) dialog.getFirstResult(); } return null; }
public static Optional<ComponentType> showComponentTypeSelectionDialog(Shell parentShell) throws CoreException { ElementListSelectionDialog dialog = new ElementListSelectionDialog(parentShell, new LabelProvider()); dialog.setElements(loadAllComponentTypes().toArray(new String[0])); dialog.setTitle("Select subcomponent's type"); // user pressed cancel if (dialog.open() == Window.OK) { Object[] objects = dialog.getResult(); for (Object result : objects) { System.out.println("result = " + result); } String typeName = objects[0].toString(); ComponentType type = loadComponentType(typeName); return Optional.of(type); } return Optional.empty(); }
/** * Prompts the user to choose from the list of given launch configurations * and returns the config the user choose or <code>null</code> if the user * pressed Cancel or if the given list is empty. * * @param configs * the list of {@link ILaunchConfiguration}s to choose from * @return the chosen {@link ILaunchConfiguration} or <code>null</code> */ public static ILaunchConfiguration chooseConfig( List<ILaunchConfiguration> configs) { if (configs.isEmpty()) { return null; } ILabelProvider labelProvider = DebugUITools.newDebugModelPresentation(); ElementListSelectionDialog dialog = new ElementListSelectionDialog( Display.getDefault().getActiveShell(), labelProvider); dialog.setElements(configs.toArray(new ILaunchConfiguration[configs .size()])); dialog.setTitle(JSBuildFileLaunchConfigurationMessages.AntLaunchShortcut_4); dialog.setMessage(JSBuildFileLaunchConfigurationMessages.AntLaunchShortcut_5); dialog.setMultipleSelection(false); int result = dialog.open(); labelProvider.dispose(); if (result == Window.OK) { return (ILaunchConfiguration) dialog.getFirstResult(); } return null; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( StatemachineDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.StatemachineModelingAssistantProviderMessage); dialog.setTitle(Messages.StatemachineModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * Returns a configuration from the given collection of configurations that should be launched, * or <code>null</code> to cancel. * * @param configList list of configurations to choose from * @return configuration to launch or <code>null</code> to cancel */ private ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList) { if (configList.size() == 1) { return (ILaunchConfiguration) configList.get(0); } IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation(); ElementListSelectionDialog dialog= new ElementListSelectionDialog(Display.getCurrent().getActiveShell(), labelProvider); dialog.setElements(configList.toArray()); dialog.setTitle("Select Configuraiton"); //$NON-NLS-1$ dialog.setMessage("&Select an existing configuration:"); //$NON-NLS-1$ dialog.setMultipleSelection(false); int result = dialog.open(); labelProvider.dispose(); if (result == Window.OK) { return (ILaunchConfiguration) dialog.getFirstResult(); } return null; }
private Preferences selectPreferences(String title) throws Exception { String[] sa = pref.childrenNames(); if (sa.length == 0){ return null; } Preferences[] pa = new Preferences[sa.length]; for (int i = 0; i < pa.length; i++) { pa[i] = pref.node(sa[i]); } ElementListSelectionDialog dialog = new ElementListSelectionDialog(fAccessText.getShell(), new PLP()); dialog.setTitle(title); dialog.setElements(pa); dialog.setMessage("Type to filter by name:"); dialog.setMultipleSelection(false); if (dialog.open() == ElementListSelectionDialog.OK) { return (Preferences)dialog.getResult()[0]; } return null; }
private void deletePre() { try { String[] sa = pref.node("fileList").keys(); if (sa.length == 0){ return; } ElementListSelectionDialog dialog = new ElementListSelectionDialog(input.getShell(), new LabelProvider()); dialog.setTitle("Select file list that you want to remove"); dialog.setElements(sa); dialog.setMessage("Type to filter by name:"); dialog.setMultipleSelection(true); if (dialog.open() == ElementListSelectionDialog.OK) { Object[] oa = dialog.getResult(); Preferences p = pref.node("fileList"); for (int i = 0; i < oa.length; i++) { String key = (String)oa[i]; remove(key); p.remove(key); } pref.put("selectedList", ""); } } catch (Exception e) { TFMPlugin.error("FileListMenuMgr deletePre", e); } }
private void setUpBrowseProjectDialog() { ILabelProvider projectLabelProvider = new BrowseProjectLabelProvider(); IJavaProject[] javaProjects = javaProjectHelper.getJavaProjects(); ElementListSelectionDialog dialog = new ElementListSelectionDialog(getControl().getShell(), projectLabelProvider); dialog.setMessage("Choose a project to run testability on:"); if (javaProjects != null) { dialog.setElements(javaProjects); } if (dialog.open() == Window.OK) { IJavaProject project = (IJavaProject) dialog.getFirstResult(); projectText.setText(project.getElementName()); setTabDirty(); } }
/** * Returns a configuration from the given collection of configurations that * should be launched, or <code>null</code> to cancel. Default implementation * opens a selection dialog that allows the user to choose one of the * specified launch configurations. Returns the chosen configuration, or * <code>null</code> if the user cancels. * * @param configList list of configurations to choose from * @return configuration to launch or <code>null</code> to cancel */ public static ILaunchConfiguration chooseConfiguration( List<ILaunchConfiguration> configList, Shell shell) { IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation(); try { ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setElements(configList.toArray()); dialog.setTitle("Choose a launch configuration:"); dialog.setMessage("More than one launch configuration is applicable; please choose one:"); dialog.setMultipleSelection(false); int result = dialog.open(); if (result == Window.OK) { return (ILaunchConfiguration) dialog.getFirstResult(); } return null; } finally { labelProvider.dispose(); } }
/** * Show media selection. * * @param excludeItemList * the exclude item list * @param owner * the owner * @return the list */ private List<MediaNode> showMediaSelection(String[] excludeItemList, Composite owner) { List<INode> availableMediaList = ((ProjectNode) _collectionNode.getLastParent()).getMediaRootNode().getMediaNodes(excludeItemList); if (availableMediaList.size() >= 0) { ElementListSelectionDialog dialog = new ElementListSelectionDialog(owner.getShell(), new NavigatorLabelProvider()); dialog.setMultipleSelection(true); dialog.setElements(availableMediaList.toArray(new INode[availableMediaList.size()])); dialog.setTitle(ResourceLoader.getString("SESSION_PROPERTY_MEDIA_SELECTOR_TITLE")); dialog.open(); Object[] selectedObjects = dialog.getResult(); List<MediaNode> nodeList = new ArrayList<MediaNode>(); if (selectedObjects != null) { for (Object node : selectedObjects) { nodeList.add((MediaNode) node); } } return nodeList; } else { MessageDialog.openError(owner.getShell(), ResourceLoader.getString("DIALOG_ERROR_TITLE"), ResourceLoader.getString("SESSION_PROPERTY_MEDIA_SELECTOR_NO_MEDIA")); return null; } }
/** * Shows a dialog to choose the {@link IJavaProject}. * * @return the chosen {@link IJavaProject} */ private IJavaProject chooseJavaProject() { final ILabelProvider labelProvider = new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); final ElementListSelectionDialog dialog = new ElementListSelectionDialog(this.getShell(), labelProvider); dialog.setTitle(LauncherMessages.AbstractJavaMainTab_4); dialog.setMessage(LauncherMessages.AbstractJavaMainTab_3); try { dialog.setElements(JavaCore.create(this.getWorkspaceRoot()).getJavaProjects()); } catch (final JavaModelException javaModelException) { JDIDebugUIPlugin.log(javaModelException); } final IJavaProject javaProject = this.getJavaProject(); if (javaProject != null) { dialog.setInitialSelections(new Object[] { javaProject }); } if (dialog.open() == Window.OK) { return (IJavaProject) dialog.getFirstResult(); } return null; }
/** * Shows a dialog for resolving an ambiguous Java element. Utility method that can be called by subclasses. * * @param elements the elements to select from * @param shell the parent shell * @param title the title of the selection dialog * @param message the message of the selection dialog * @return returns the selected element or <code>null</code> if the dialog has been cancelled */ public static IJavaElement selectJavaElement(IJavaElement[] elements, Shell shell, String title, String message) { int nResults= elements.length; if (nResults == 0) return null; if (nResults == 1) return elements[0]; int flags= JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT; ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags)); dialog.setTitle(title); dialog.setMessage(message); dialog.setElements(elements); if (dialog.open() == Window.OK) { return (IJavaElement) dialog.getFirstResult(); } return null; }
private IJavaProject chooseProject() { IJavaProject[] projects; try { projects= JavaCore.create(fWorkspaceRoot).getJavaProjects(); } catch (JavaModelException e) { JavaPlugin.log(e); projects= new IJavaProject[0]; } ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider); dialog.setTitle(NewWizardMessages.NewSourceFolderWizardPage_ChooseProjectDialog_title); dialog.setMessage(NewWizardMessages.NewSourceFolderWizardPage_ChooseProjectDialog_description); dialog.setElements(projects); dialog.setInitialSelections(new Object[] { fCurrJProject }); dialog.setHelpAvailable(false); if (dialog.open() == Window.OK) { return (IJavaProject) dialog.getFirstResult(); } return null; }
/** * Opens a type selection dialog based on the given <code>title</code> and <code>types</code>. * * @param <T> the specific data type to work with * @param shell the parent shell * @param title the title * @param types the types to select from * @param selected the type to be selected by default, <b>null</b> for none * @return the selected datatype, <b>null</b> if none was selected */ @SuppressWarnings("unchecked") public static <T extends IDatatype> T open(Shell shell, String title, Collection<T> types, T selected) { T result = null; ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new TypeLabelProvider()); dialog.setAllowDuplicates(false); dialog.setMultipleSelection(false); dialog.setElements(types.toArray()); dialog.setTitle(title); if (null != selected) { Object[] initialSelections = new Object[1]; initialSelections[0] = selected; dialog.setInitialSelections(initialSelections); } if (dialog.open() == Window.OK) { result = (T) dialog.getFirstResult(); } return result; }
/** * Mouse handler to open the dialog. * * @param e * The mouse event to process. */ @Override public void mouseUp(MouseEvent e) { Shell shell = e.widget.getDisplay().getActiveShell(); List<VPMAnalyzer> availableAnalyzer = Lists.newArrayList(vpmAnalyzerService.getAvailableAnalyzers()); availableAnalyzer.removeAll(page.getAnalyzers()); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new VPMAnalyzerLabelProvider()); dialog.setTitle("VPM Analyzer Selection"); dialog.setMessage("Select an analyzer by name (* = any string, ? = any char):"); dialog.setElements(availableAnalyzer.toArray()); dialog.setMultipleSelection(false); int result = dialog.open(); if (result == Window.OK) { Object analyzerObject = dialog.getFirstResult(); if (analyzerObject != null) { VPMAnalyzer analyzer = (VPMAnalyzer) analyzerObject; page.addAnalyzer(analyzer); } } }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( SmcDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.SmcModelingAssistantProviderMessage); dialog.setTitle(Messages.SmcModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @param shell * @param project * @param filter * @return the selected file */ public static IType selectClass(final Shell shell, final IProject project, final Filter filter) { final int flags = JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT; final ElementListSelectionDialog dlg = new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags)); dlg.setTitle("Select Custom Operation(s) Class"); dlg.setMessage("Select a custom operation(s) class"); dlg.setMatchEmptyString(true); dlg.setHelpAvailable(false); final List<IType> types = new ArrayList<>(); populateClasses(shell, JavaCore.create(project), types, filter); dlg.setElements(types.toArray()); return (dlg.open() == Window.OK) ? (IType) dlg.getFirstResult() : null; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( Wc2014DiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.Wc2014ModelingAssistantProviderMessage); dialog.setTitle(Messages.Wc2014ModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin .getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(SimpleBPMN.diagram.part.Messages.SimpleBPMNModelingAssistantProviderMessage); dialog.setTitle(SimpleBPMN.diagram.part.Messages.SimpleBPMNModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
private void handleProjectButtonSelected() { ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider); dialog.setTitle("Select Project"); dialog.setMessage("Select a LeJOS Project"); try { dialog.setElements(getLejosProjects()); } catch (CoreException jme) { LeJOSEV3Util.log(jme); } IJavaProject javaProject= getJavaProject(); if (javaProject != null) dialog.setInitialSelections(new Object[] { javaProject }); if (dialog.open() == Window.OK) { IJavaProject project = (IJavaProject) dialog.getFirstResult(); projectText.setText(project.getElementName()); } }
private IConnectionProfile selectDataSource() { ElementListSelectionDialog dialog = new ElementListSelectionDialog( getViewSite().getShell(), new LabelProvider() { @Override public String getText(Object element) { IConnectionProfile connectionProfile = (IConnectionProfile) element; return connectionProfile.getName(); } }); dialog.setElements(CommonEclipseUtil.getConnectionProfiles()); dialog.setTitle("DataSource Explorer"); dialog.setMessage("Select a datasource"); dialog.setMultipleSelection(false); if (dialog.open() != Window.OK) { // this.hideView(); return null; } Object[] result = dialog.getResult(); return result.length > 0 ? (IConnectionProfile) result[0] : null; }
private Table selectTable() { ElementListSelectionDialog dialog = new ElementListSelectionDialog( getViewSite().getShell(), new LabelProvider() { @Override public String getText(Object element) { Table table = (Table) element; return table.getTableName(); } }); dialog.setElements(CommonEclipseUtil.getTablesFromProfile(connectionProfile).toArray()); dialog.setTitle("Tables Explorer"); dialog.setMessage("Select a table"); dialog.setMultipleSelection(false); if (dialog.open() != Window.OK) { return null; } return (Table) dialog.getFirstResult(); }
private IJavaProject chooseJavaProject() { ILabelProvider labelProvider = new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider); dialog.setTitle("Project Secletion"); dialog.setMessage("Select a RoboVM project to launch"); try { IJavaProject[] projects = getRoboVMProjects(); dialog.setElements(projects); IJavaProject selectedProject = findProject(projects, projectText.getText()); if (selectedProject != null) { dialog.setInitialSelections(new Object[] { selectedProject }); } if (dialog.open() == Window.OK) { return (IJavaProject) dialog.getFirstResult(); } } catch (CoreException e) { RoboVMPlugin.log(e); } return null; }
/** * COPIED/MODIFIED from AntLaunchShortcut */ protected ILaunchConfiguration chooseConfig(List<ILaunchConfiguration> configs) { if (configs.isEmpty()) { return null; } ILabelProvider labelProvider = DebugUITools.newDebugModelPresentation(); ElementListSelectionDialog dialog = new ElementListSelectionDialog(Display.getDefault().getActiveShell(), labelProvider); dialog.setElements(configs.toArray(new ILaunchConfiguration[configs.size()])); dialog.setTitle("Pick a Python configuration"); dialog.setMessage("Choose a python configuration to run"); dialog.setMultipleSelection(false); int result = dialog.open(); labelProvider.dispose(); if (result == Window.OK) { return (ILaunchConfiguration) dialog.getFirstResult(); } else { return null; } }
protected IProject chooseProject() throws OperationCancellation { Shell shell = button.getShell(); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new WorkbenchLabelProvider()); dialog.setTitle(LangUIMessages.projectField_chooseProject_title); dialog.setMessage(LangUIMessages.projectField_chooseProject_message); try { final IProject[] projects = getDialogChooseElements(); dialog.setElements(projects); } catch (CoreException ce) { EclipseCore.logStatus(ce); } final IProject project = getProject(); if (project != null && project.isOpen()) { dialog.setInitialSelections(new Object[] { project }); } if (dialog.open() == Window.OK) { return (IProject) dialog.getFirstResult(); } throw new OperationCancellation(); }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditorPlugin .getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setMessage( edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.ICSE15_SequenceDiagram_MAVOModelingAssistantProviderMessage); dialog.setTitle( edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.ICSE15_SequenceDiagram_MAVOModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditorPlugin .getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.Messages.NECSIS14_ClassDiagramModelingAssistantProviderMessage); dialog.setTitle(edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.Messages.NECSIS14_ClassDiagramModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditorPlugin .getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.Messages.NECSIS14_DatabaseSchemaModelingAssistantProviderMessage); dialog.setTitle(edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.Messages.NECSIS14_DatabaseSchemaModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( MIDDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setMessage(Messages.MIDModelingAssistantProviderMessage); dialog.setTitle(Messages.MIDModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditorPlugin .getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setMessage( edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.RelationalDatabase_MAVOModelingAssistantProviderMessage); dialog.setTitle( edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.RelationalDatabase_MAVOModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( RelationalDatabaseDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.RelationalDatabaseModelingAssistantProviderMessage); dialog.setTitle(Messages.RelationalDatabaseModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setMessage( edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.IStar_MAVOModelingAssistantProviderMessage); dialog.setTitle( edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.IStar_MAVOModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( IStarDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.IStarModelingAssistantProviderMessage); dialog.setTitle(Messages.IStarModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( StateMachineDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.StateMachineModelingAssistantProviderMessage); dialog.setTitle(Messages.StateMachineModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVODiagramEditorPlugin .getInstance().getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); dialog.setMessage( edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.StateMachine_MAVOModelingAssistantProviderMessage); dialog.setTitle( edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.StateMachine_MAVOModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( StateDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.StateModelingAssistantProviderMessage); dialog.setTitle(Messages.StateModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }
/** * @generated */ protected EObject selectElement(EObject[] elements) { Shell shell = Display.getCurrent().getActiveShell(); ILabelProvider labelProvider = new AdapterFactoryLabelProvider( ArmyDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); ElementListSelectionDialog dialog = new ElementListSelectionDialog( shell, labelProvider); dialog.setMessage(Messages.ArmyModelingAssistantProviderMessage); dialog.setTitle(Messages.ArmyModelingAssistantProviderTitle); dialog.setMultipleSelection(false); dialog.setElements(elements); EObject selected = null; if (dialog.open() == Window.OK) { selected = (EObject) dialog.getFirstResult(); } return selected; }