Ask to the user to selected the SRE.
334994
protected void selectSRE() {
		final File file;
		if (StandardSREPage.this.workingCopy.getJarFile() != null) {
			file = StandardSREPage.this.workingCopy.getJarFile().toFile();
		} else {
			file = null;
		}

		final FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
		dialog.setText(Messages.StandardSREPage_4);
		dialog.setFilterExtensions(new String[] {"*.jar"}); //$NON-NLS-1$
		if (file != null && file.exists()) {
			dialog.setFileName(file.getAbsolutePath());
		}
		final String selectedFile = dialog.open();
		if (selectedFile != null) {
			final IPath path = Path.fromOSString(selectedFile);
			//			IWorkspace workspace = ResourcesPlugin.getWorkspace();
			//			IPath workspaceLocation = workspace.getRoot().getLocation();
			//			SARLEclipsePlugin.logDebugMessage("Workspace (Path): " + workspaceLocation); //$NON-NLS-1$
			//			if (workspaceLocation.isPrefixOf(path)) {
			//				SARLEclipsePlugin.logDebugMessage("Make relative path"); //$NON-NLS-1$
			//				path = workspaceLocation.makeRelativeTo(workspaceLocation);
			//			}
			//			SARLEclipsePlugin.logDebugMessage("Resolved Path (Path): " + path); //$NON-NLS-1$
			//
			createWorkingCopy();
			this.workingCopy.setJarFile(path);
			final IStatus status = validate();
			//
			initializeFields();
			setPageStatus(status);
			updatePageStatus();
		}
	}
645333
def _AskUser(self):
    
    if self._show_percent:
      progress = int(self._displayed*100 / (len(self._text.splitlines())))
      progress_text = ' (%d%%)' % progress
    else:
      progress_text = ''
    question = AnsiText(
        'Enter: next line, Space: next page, '
        'b: prev page, q: quit.%s' %
        progress_text, ['green'])
    sys.stdout.write(question)
    sys.stdout.flush()
    ch = self._GetCh()
    sys.stdout.write('\r%s\r' % (' '*len(question)))
    sys.stdout.flush()
    return ch
1019874
def submit_by_selector(self, selector):
    """"""
    elem = find_element_by_jquery(world.browser, selector)
    elem.submit()
1331914
def accept(self, event):
        """"""

        self.log('Invitation accepted:', event.__dict__, lvl=debug)
        try:
            uuid = event.data
            enrollment = objectmodels['enrollment'].find_one({
                'uuid': uuid
            })

            if enrollment is not None:
                self.log('Enrollment found', lvl=debug)
                if enrollment.status == 'Open':
                    self.log('Enrollment is still open', lvl=debug)
                    if enrollment.method == 'Invited' and self.config.auto_accept_invited:
                        enrollment.status = 'Accepted'

                        data = 'You should have received an email with your new password ' \
                               'and can now log in to the system and start to use it. <br/>' \
                               'Please change your password immediately after logging in'
                        password = std_human_uid().replace(" ", '')

                        self._create_user(enrollment.name, password, enrollment.email, enrollment.method, uuid)
                        self._send_acceptance(enrollment, password, event)
                    elif enrollment.method == 'Enrolled' and self.config.auto_accept_enrolled:
                        enrollment.status = 'Accepted'
                        data = 'Your account is now activated.'

                        self._create_user(enrollment.name, enrollment.password, enrollment.email, enrollment.method,
                                          uuid)

                        # TODO: Evaluate if sending an acceptance mail makes sense
                        # self._send_acceptance(enrollment, "", event)
                    else:
                        enrollment.status = 'Pending'
                        data = 'Someone has to confirm your enrollment ' \
                               'first. Thank you, for your patience.'
                        # TODO: Alert admin users
                    enrollment.save()

                # Reaffirm acceptance to end user, when clicking on the link multiple times
                elif enrollment.status == 'Accepted':
                    data = 'You can now log in to the system and start to use it.'
                elif enrollment.status == 'Pending':
                    data = 'Someone has to confirm your enrollment ' \
                           'first. Thank you, for your patience.'
                else:
                    self.log('Enrollment has been closed already!', lvl=warn)
                    self._fail(event)
                    return
                packet = {
                    'component': 'hfos.enrol.enrolmanager',
                    'action': 'accept',
                    'data': {True: data}
                }
                self.fireEvent(send(event.client.uuid, packet))
            else:
                self.log('No enrollment available.', lvl=warn)
                self._fail(event)
        except Exception as e:
            self.log('Error during invitation accept handling:', e, type(e),
                     lvl=warn, exc=True)
516656
protected void handleInstalledSREsButtonSelected() {
		PreferencesUtil.createPreferenceDialogOn(
				getControl().getShell(),
				SREsPreferencePage.ID,
				new String[] {SREsPreferencePage.ID},
				null).open();
	}
363279
protected boolean requestSetSelection(boolean selected) {
		boolean previousState = isSelected();

		if (previousState != selected) {
			this.selected = onSelection(selected);
			if (logger.isDebugEnabled()) {
				logger.debug("Toggle command selection returned '" + this.selected + "'");
			}
		}

		// we must always update toggle buttons
		Iterator it = buttonIterator();
		if (logger.isDebugEnabled()) {
			logger.debug("Updating all attached toggle buttons to '" + isSelected() + "'");
		}
		while (it.hasNext()) {
			AbstractButton button = (AbstractButton)it.next();
			button.setSelected(isSelected());
		}

		if (previousState != isSelected()) {
			if (logger.isDebugEnabled()) {
				logger.debug("Selection changed; firing property change event");
			}
			firePropertyChange(SELECTED_PROPERTY, previousState, isSelected());
		}

		return isSelected();
	}
910245
def select_role(self):
        

        roles = [(m.key, m.__unicode__()) for m in RoleModel.objects.filter(
            abstract_role=self.current.role.abstract_role,
            unit=self.current.role.unit) if m != self.current.role]

        if roles:
            _form = forms.JsonForm(title=_(u'Assign to workflow'))
            _form.select_role = fields.Integer(_(u"Chose Role"), choices=roles)
            _form.explain_text = fields.String(_(u"Explain Text"), required=False)
            _form.send_button = fields.Button(_(u"Send"))
            self.form_out(_form)
        else:
            title = _(u"Unsuccessful")
            msg = _(u"Assign role not found")
            self.current.msg_box(title=title, msg=msg)
1303682
def get_selection_owner(self, selection):
        """"""
        r = request.GetSelectionOwner(display = self.display,
                                      selection = selection)
        return r.owner
1126512
public void select(SelectRequest request) {
    call(
      new PostRequest(path("select"))
        .setParam("gateId", request.getGateId())
        .setParam("organization", request.getOrganization())
        .setParam("projectId", request.getProjectId())
        .setParam("projectKey", request.getProjectKey())
        .setMediaType(MediaTypes.JSON)
    ).content();
  }
1153424
def choice(self, question, choices, default=None, attempts=None, multiple=False):
        
        question = ChoiceQuestion(question, choices, default)

        question.set_max_attempts(attempts)
        question.set_multi_select(multiple)

        return self._io.ask_question(question)
1145616
def prompt_for_choice(values, message, input_type=int, output_type=None):
    """"""
    output = None
    while not output:
        index = prompt_for_input(message, input_type=input_type)

        try:
            output = utf8(values[index])
        except IndexError:
            error_message('Selection out of range')
            continue

    if output_type:
        output = output_type(output)

    return output
67571
def ask_select prompt="Enter selection pattern: "
      ret = get_string prompt
      return if ret.nil? || ret ==  ""
      indices = get_matching_indices ret
      #$log.debug "listselectionmodel: ask_select got matches#{@indices} "
      return if indices.nil? || indices.empty?
      indices.each { |e|
        # will not work if single select !! FIXME
        add_row_selection_interval e,e
      }
    end
959064
def select(self):
        """"""
        # Try to match the asterisk, any or list of vars.
        if self.tokens.accept(grammar.select_any):
            return self.select_any()

        if self.tokens.accept(grammar.select_all):
            # The FROM after SELECT * is required.
            self.tokens.expect(grammar.select_from)
            return self.select_from()

        return self.select_what()
855749
def select_server(self,
                      selector,
                      server_selection_timeout=None,
                      address=None):
        """"""
        return random.choice(self.select_servers(selector,
                                                 server_selection_timeout,
                                                 address))
585909
def ask_select prompt="Enter selection pattern: "
      ret = ask(prompt, String) {|q| yield q if block_given? }
      return if ret.nil? || ret ==  ""
      indices = get_matching_indices ret
      return if indices.nil? || indices.empty?
      indices.each { |e|
        # will not work if single select !! FIXME
        add_row_selection_interval e,e
      }
      @repaint_required = true
    end
192492
def _bselect(self, selection, start_bindex, end_bindex):
        
        selection.select(self._model.index2qindexb(start_bindex), self._model.index2qindexb(end_bindex))
        selection.select(self._model.index2qindexc(start_bindex), self._model.index2qindexc(end_bindex))
751265
void onSelect() {

        if (m_selectHandler != null) {
            String principalType = (String)m_principalTypeSelect.getValue();
            if (CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_LABEL_ROLE_0).equals(
                principalType)) {
                principalType = CmsRole.PRINCIPAL_ROLE;
            }
            m_selectHandler.onPrincipalSelect(principalType, m_principalName.getValue());
        }
    }