Set the activity chooser policy of the model backed by the current
share history file if needed which is if there is a registered callback.
977122
private void setActivityChooserPolicyIfNeeded() {
        if (mOnShareTargetSelectedListener == null) {
            return;
        }
        if (mOnChooseActivityListener == null) {
            mOnChooseActivityListener = new ShareAcitivityChooserModelPolicy();
        }
        ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
        dataModel.setOnChooseActivityListener(mOnChooseActivityListener);
    }
33700
def set_to_current(self, ):
        
        cur = self.get_current_file()
        if cur is not None:
            self.set_selection(cur)
        else:
            self.init_selection()
273690
def _set_selected_action(self, action):
        """"""
        assert action in self._action_sets

        if self._selected_action is not None:
            raise ValueError("The action has already been selected.")
        self._selected_action = action
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();
		}
	}
762910
def _set_log_view(self, session):
        """"""
        if self._log_view == FEDERATED:
            try:
                session.use_federated_log_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_isolated_log_view()
            except AttributeError:
                pass
19785
def cut_action_callback(self, *event):
        """"""
        if react_to_event(self.view, self.tree_view, event) and self.active_entry_widget is None:
            sm_selection, sm_selected_model_list = self.get_state_machine_selection()
            # only list specific elements are cut by widget
            if sm_selection is not None:
                sm_selection.set(sm_selected_model_list)
                global_clipboard.cut(sm_selection)
                return True
798247
def set_history_file(self, path):
        """"""
        if path:
            self.history = prompt_toolkit.history.FileHistory(fixpath(path))
        else:
            self.history = prompt_toolkit.history.InMemoryHistory()
76630
def activity_changed(self, selection, model):
        
        (model, iter) = selection.get_selected()

        # treat any selected case
        unsorted_selected = self._get_selected_category() == -1
        self.get_widget('activity_edit').set_sensitive(iter != None)
        self.get_widget('activity_remove').set_sensitive(iter != None)
1365378
def setAsApplication(myappid):
    

    if os.name == 'nt':
        import ctypes
        ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
748319
def set_current_state(self):
        """""""
        if not self.thresholds:
            self.thresholds = self.parent.get_existing_keyword('thresholds')
        if not self.value_maps:
            self.value_maps = self.parent.get_existing_keyword('value_maps')
488226
private void initializeOverrideBackButton(final SharedPreferences sharedPreferences) {
        String key = getString(R.string.override_navigation_icon_preference_key);
        boolean defaultValue = Boolean.valueOf(
                getString(R.string.override_navigation_icon_preference_default_value));
        boolean overrideNavigationIcon = sharedPreferences.getBoolean(key, defaultValue);
        overrideNavigationIcon(overrideNavigationIcon);
    }
1293135
def save_model(self, request, obj, form, change):
        """"""
        obj._history_user = request.user
        super(SimpleHistoryAdmin, self).save_model(request, obj, form, change)
470843
function addToWorkingSetAndSelect(fullPath) {
        DeprecationWarning.deprecationWarning("Use FileViewController.openFileAndAddToWorkingSet() instead of FileViewController.addToWorkingSetAndSelect().", true);
        var result = new $.Deferred();
        openFileAndAddToWorkingSet(fullPath)
            .done(function (file) {
                var doc;

                if (file) {
                    doc = DocumentManager.getOpenDocumentForPath(file.fullPath);
                }

                result.resolve(doc);
            })
            .fail(function (err) {
                result.reject(err);
            });
        return result.promise();
    }
1224686
def participant_policy(self, value):
        
        old_policy = self.participant_policy
        new_policy = value
        self._participant_policy = new_policy
        notify(ParticipationPolicyChangedEvent(self, old_policy, new_policy))
698911
def save(self, filepath):
        
        self._config.add_section("RetryPolicy")
        self._config.set("RetryPolicy", "retries", str(self.retry_policy.retries))
        self._config.set("RetryPolicy", "backoff_factor",
                         str(self.retry_policy.backoff_factor))
        self._config.set("RetryPolicy", "max_backoff",
                         str(self.retry_policy.max_backoff))
        super(RequestHTTPSenderConfiguration, self).save(filepath)
1283698
def set_autosession(self, value=None):
        
        if value is not None:
            self.rollback()
            self.autosession = value
        return self.autosession
652932
void setLeaderState(boolean isLeader)
    {
        m_isLeader = isLeader;
        // The leader doesn't truncate its own SP log; if promoted,
        // wipe out the SP portion of the existing log. This promotion
        // action always happens after repair is completed.
        if (m_isLeader) {
            if (!m_logSP.isEmpty()) {
                truncate(m_logSP.getLast().getHandle(), IS_SP);
            }
        }
    }