Opens a dialog with debug package selection options
543026
function () {
			var oModel = this._oDialog.getModel("view"),
				oTreeResults;

			// early out if already open
			if (this._oDebugPopover && this._oDebugPopover.isOpen()) {
				return;
			}

			// fill and bind the tree structure from the currently loaded modules
			oTreeResults = this._treeHelper.toTreeModel(this._oModuleSystemInfo);
			oModel.setProperty("/DebugModules", [oTreeResults.tree]);
			this._updateTreeInfos();

			// create dialog lazily
			if (!this._oDebugPopover) {
				this._oDebugPopover = sap.ui.xmlfragment(this._DEBUG_MODULES_ID, "sap.ui.core.support.techinfo.TechnicalInfoDebugDialog", this);
				this._oDialog.addDependent(this._oDebugPopover);
				syncStyleClass(this._getContentDensityClass(), this._oDialog, this._oDebugPopover);
				var oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID);
				try {
					this._validateCustomDebugValue(oControl.getValue());
				} catch (oException)  {
					this._showError(oControl, oException.message);
					return;
				}
			}

			// adopt tree depth to the deepest currently selected module
			this._getControl("tree", this._DEBUG_MODULES_ID).expandToLevel(Math.max(this._MIN_EXPAND_LEVEL_DEBUG_MODULES, oTreeResults.depth));

			// open dialog
			this._oDebugPopover.open();
		}
1284883
private void showNewDebugger(EnhancedDebugger debugger) {
        if (frame == null) {
            createDebug();
        }
        debugger.tabbedPane.setName("XMPPConnection_" + tabbedPane.getComponentCount());
        tabbedPane.add(debugger.tabbedPane, tabbedPane.getComponentCount() - 1);
        tabbedPane.setIconAt(tabbedPane.indexOfComponent(debugger.tabbedPane), connectionCreatedIcon);
        frame.setTitle(
                "Smack Debug Window -- Total connections: " + (tabbedPane.getComponentCount() - 1));
        // Keep the added debugger for later access
        debuggers.add(debugger);
    }
953927
function printNodeOptions (log = debug) {
  if (!log.enabled) {
    return
  }

  if (process.env.NODE_OPTIONS) {
    log('NODE_OPTIONS=%s', process.env.NODE_OPTIONS)
  } else {
    log('NODE_OPTIONS is not set')
  }
}
1249852
function (oEvent) {
			var bSelected = oEvent.getParameter("selected");
			this._confirmReload(function () {
				this._reloadWithParameter("sap-ui-debug", bSelected);
			}.bind(this), function () {
				var oModel = this._oDialog.getModel("view");
				oModel.setProperty("/DebugMode", !oModel.getProperty("/DebugMode"));
			}.bind(this));
		}
759589
def run(self):
        
        opt_parser = setup_opt_parser()
        (self.options, remaining_args) = opt_parser.parse_args()
        logger = self.set_log_level()

        pkg_spec = validate_pypi_opts(opt_parser)
        if not pkg_spec:
            pkg_spec = remaining_args
        self.pkg_spec = pkg_spec

        if not self.options.pypi_search and (len(sys.argv) == 1 or\
                len(remaining_args) > 2):
            opt_parser.print_help()
            return 2

        #Options that depend on querying installed packages, not PyPI.
        #We find the proper case for package names if they are installed,
        #otherwise PyPI returns the correct case.
        if self.options.show_deps or self.options.show_all or \
                self.options.show_active or self.options.show_non_active  or \
                (self.options.show_updates and pkg_spec):
            want_installed = True
        else:
            want_installed = False
        #show_updates may or may not have a pkg_spec
        if not want_installed or self.options.show_updates:
            self.pypi = CheeseShop(self.options.debug)
            #XXX: We should return 2 here if we couldn't create xmlrpc server

        if pkg_spec:
            (self.project_name, self.version, self.all_versions) = \
                    self.parse_pkg_ver(want_installed)
            if want_installed and not self.project_name:
                logger.error("%s is not installed." % pkg_spec[0])
                return 1

        #I could prefix all these with 'cmd_' and the methods also
        #and then iterate over the `options` dictionary keys...
        commands = ['show_deps', 'query_metadata_pypi', 'fetch',
                'versions_available', 'show_updates', 'browse_website',
                'show_download_links', 'pypi_search', 'show_pypi_changelog',
                'show_pypi_releases', 'yolk_version', 'show_all',
                'show_active', 'show_non_active', 'show_entry_map',
                'show_entry_points']

        #Run first command it finds, and only the first command, then return
        #XXX: Check if more than one command was set in options and give error?
        for action in commands:
            if getattr(self.options, action):
                return getattr(self, action)()
        opt_parser.print_help()
528959
function openDialog(files, config, handleInsert) {
  uploadcare.openDialog(files, config).done(({ promise }) =>
    promise().then(({ cdnUrl, count }) => {
      if (config.multiple) {
        const urls = Array.from({ length: count }, (val, idx) => `${cdnUrl}nth/${idx}/`);
        handleInsert(urls);
      } else {
        handleInsert(cdnUrl);
      }
    }),
  );
}
539794
function(title, message, choices, defaultChoice) {
            return Dialogs.open(null, {
                "title": title,
                "message": message,
                "dialog": "select",
                "default": defaultChoice,
                "choices": choices,
                "autoFocus": true,
                "valueSelector": "selectorPrompt"
            });
        }
885108
protected void openDialog(DialogOptions dlgOptions) {

        m_dialog = new CmsPopup(
            Messages.get().key(Messages.GUI_DIALOG_CONTENTEDITOR_TITLE_0)
                + " - "
                + (m_isNew ? m_editableData.getNewTitle() : m_editableData.getSitePath()));
        m_dialog.addStyleName(I_CmsLayoutBundle.INSTANCE.contentEditorCss().contentEditor());

        // calculate width
        int width = Window.getClientWidth();
        width = (width < 1350) ? width - 50 : 1300;
        if (dlgOptions.getSuggestedWidth() != null) {
            width = dlgOptions.getSuggestedWidth().intValue();
        }

        m_dialog.setWidth(width);

        // calculate height
        int height = Window.getClientHeight() - 50;
        height = (height < 645) ? 645 : height;
        if (dlgOptions.getSuggestedHeight() != null) {
            height = dlgOptions.getSuggestedHeight().intValue();
        }
        m_dialog.setHeight(height);

        m_dialog.setGlassEnabled(true);
        m_dialog.setUseAnimation(false);
        final CmsIFrame editorFrame = new CmsIFrame(EDITOR_IFRAME_NAME, "");
        m_dialog.addDialogClose(new Command() {

            /**
             * @see com.google.gwt.user.client.Command#execute()
             */
            public void execute() {

                CmsConfirmDialog confirmDlg = new CmsConfirmDialog(
                    Messages.get().key(Messages.GUI_EDITOR_CLOSE_CAPTION_0),
                    Messages.get().key(Messages.GUI_EDITOR_CLOSE_TEXT_0));
                confirmDlg.setHandler(new I_CmsConfirmDialogHandler() {

                    public void onClose() {

                        // do nothing
                    }

                    public void onOk() {

                        // make sure the onunload event is triggered within the editor frames for ALL browsers
                        editorFrame.setUrl("about:blank");
                        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                            public void execute() {

                                CmsContentEditorDialog.this.close();
                            }
                        });
                    }
                });
                confirmDlg.center();
                // Let the confirm dialog handle the closing
                throw new CmsCancelCloseException();
            }
        });

        m_dialog.add(editorFrame);
        m_dialog.setPositionFixed();
        m_dialog.center();
        m_form = generateForm(m_editableData, m_isNew, EDITOR_IFRAME_NAME, m_mode);
        RootPanel.getBodyElement().appendChild(m_form);
        m_form.submit();

        // adding on close handler
        m_closingHandlerRegistration = Window.addWindowClosingHandler(new ClosingHandler() {

            public void onWindowClosing(ClosingEvent event) {

                onWindowClose();
            }
        });
    }
412710
function (that) {
        //If debugger is running again deactive buttons and remove line highlight
        that._nodeDebuggerDomain.on('running', function () {
            that.nodeDebuggerPanel.$logPanel.find('a.active').addClass('inactive').removeClass('active');
            if (that._highlightCm) {
                that._highlightCm.removeLineClass(that._activeLine, 'node-debugger-highlight-background', 'node-debugger-highlight');
                that._highlightCm = null;
                that._activeLine = null;
                that._activeDocPath = null;
            }
        });

        //If the debugger breaks, activate buttons and open the file we break/highlight line
        that._nodeDebuggerDomain.on('break', function (e, body) {
            var docPath = '';
            if (body.script && body.script.name) {
                //Fixme: Just to support windows, however this most likely won't work in every case
                docPath = body.script.name.replace(/\\/g, '/');
            }

            //Make sure the panel is open
            that.nodeDebuggerPanel.panel.show();
            that.nodeDebuggerPanel.$logPanel.find('a.inactive').addClass('active').removeClass('inactive');
            // Clear locals
            that.nodeDebuggerPanel.$debuggerSideBar.find('.brackets-nodejs-integration-debugger-log').remove();

            //Remove old highlight
            if (that._highlightCm) {
                that._highlightCm.removeLineClass(that._activeLine, 'node-debugger-highlight-background', 'node-debugger-highlight');
            }

            //Where is the break?
            that._activeLine = body.sourceLine;
            that._activeDocPath = docPath;
            //Open the document and jump to line
            openActiveDoc(that);
        });

        //If the Debugger connects highlight the UI parts that need to be highlighted
        that._nodeDebuggerDomain.on('connect', function (e, body) {
            that.nodeDebuggerPanel.$debuggerSideBar.find('.brackets-nodejs-integration-debugger-log').remove();
            that.nodeDebuggerPanel.$logPanel.find('.activate').html('<i class="fa fa-check-circle" aria-hidden="true"></i>');
            if (prefs.get('debugger_break_on_start')) {
                utils.show_popup_message(strings.DEBUGGER_FIRST_BREAK);
            }
            else {
                utils.show_popup_message(strings.DEBUGGER_CONNECTED);
            }

            if (body.running) {
                that.nodeDebuggerPanel.$logPanel.find('a.active').addClass('inactive').removeClass('active');
            }
            else {
                that.nodeDebuggerPanel.$logPanel.find('a.inactive').addClass('active').removeClass('inactive');
            }
        });

        //If the Debugger disconnect remove all the highlights
        that._nodeDebuggerDomain.on('close', function (e, err) {
            var msg = err;
            if (err === 'ECONNREFUSED') {
                msg = 'Could not connect to ' + prefs.get('debugger-host') + ':' + prefs.get('debugger-port');
            }

            if (msg && msg !== 'ECONNRESET') {
                that.nodeDebuggerPanel.log($('<span>').text(msg));
                utils.show_popup_message('Debugger: ' + msg);
            }
            if (err === false) {
                utils.show_popup_message('Debugger: disconnected.');
            }

            //GUI update
            that.nodeDebuggerPanel.$logPanel.find('.activate').html('<i class="fa fa-times-circle" aria-hidden="true"></i>');
            that.nodeDebuggerPanel.$logPanel.find('a.active').addClass('inactive').removeClass('active');


            //remove highlight
            if (that._highlightCm) {
                that._highlightCm.removeLineClass(that._activeLine, 'node-debugger-highlight-background', 'node-debugger-highlight');
                that._highlightCm = null;
                that._activeLine = null;
            }
        });

        //On evaluate display the result
        that._nodeDebuggerDomain.on('eval', function (e, body) {
            var $wrapper = $('<span>').addClass('wrapper');
            var $output = that.nodeDebuggerPanel.createEvalHTML(body, 0, body.lookup, prefs.get('lookupDepth'));

            $output.appendTo($wrapper);
            that.nodeDebuggerPanel.log($wrapper);
        });

    }
415030
function(title, message, defaultmsg) {
            return Dialogs.open(null, {
                "title": title,
                "message": message,
                "dialog": "prompt",
                "default": defaultmsg,
                "autoFocus": true,
                "valueSelector": "selectorPrompt"
            });
        }
618521
private void promptForFiles() {
        DialogProperties properties = new DialogProperties();
        properties.selection_mode = DialogConfigs.MULTI_MODE;
        properties.selection_type = DialogConfigs.FILE_SELECT;
        properties.root = new File(DialogConfigs.DEFAULT_DIR);
        properties.error_dir = new File(DialogConfigs.DEFAULT_DIR);
        properties.offset = new File(DialogConfigs.DEFAULT_DIR);

        Set<String> registeredExtensions = ArchiveFileFactory.getRegisteredExtensions();
        //api check
        if (Build.VERSION.SDK_INT >= 14)
            registeredExtensions.add("gpkg");
        registeredExtensions.add("map");

        String[] ret = new String[registeredExtensions.size()];
        ret = registeredExtensions.toArray(ret);
        properties.extensions = ret;

        FilePickerDialog dialog = new FilePickerDialog(getContext(), properties);
        dialog.setTitle("Select a File");
        dialog.setDialogSelectionListener(new DialogSelectionListener() {
            @Override
            public void onSelectedFilePaths(String[] files) {
                //files is the array of the paths of files selected by the Application User.
                setProviderConfig(files);
            }

        });
        dialog.show();
    }
1153263
def open_project(self, path=None, restart_consoles=True,
                     save_previous_files=True):
        """"""
        self.switch_to_plugin()
        if path is None:
            basedir = get_home_dir()
            path = getexistingdirectory(parent=self,
                                        caption=_("Open project"),
                                        basedir=basedir)
            path = encoding.to_unicode_from_fs(path)
            if not self.is_valid_project(path):
                if path:
                    QMessageBox.critical(self, _('Error'),
                                _("<b>%s</b> is not a Spyder project!") % path)
                return
        else:
            path = encoding.to_unicode_from_fs(path)

        self.add_to_recent(path)

        # A project was not open before
        if self.current_active_project is None:
            if save_previous_files and self.main.editor is not None:
                self.main.editor.save_open_files()
            if self.main.editor is not None:
                self.main.editor.set_option('last_working_dir',
                                            getcwd_or_home())
            if self.get_option('visible_if_project_open'):
                self.show_explorer()
        else:
            # We are switching projects
            if self.main.editor is not None:
                self.set_project_filenames(
                    self.main.editor.get_open_filenames())

        self.current_active_project = EmptyProject(path)
        self.latest_project = EmptyProject(path)
        self.set_option('current_project_path', self.get_active_project_path())

        self.setup_menu_actions()
        self.sig_project_loaded.emit(path)
        self.sig_pythonpath_changed.emit()

        if restart_consoles:
            self.restart_consoles()
1136162
protected void openPopup() {

        m_popup.setWidth(475);
        m_popup.setAutoHideEnabled(true);
        m_popup.addCloseHandler(new CloseHandler<PopupPanel>() {

            public void onClose(CloseEvent<PopupPanel> event) {

                closePopupDefault();

            }
        });

        m_popup.addDialogClose(new Command() {

            public void execute() {

                // nothing to do all will be done in onClose();

            }
        });

        if (m_previewHandlerRegistration != null) {
            m_previewHandlerRegistration.removeHandler();

        }
        m_previewHandlerRegistration = Event.addNativePreviewHandler(new CloseEventPreviewHandler());
        m_popup.showRelativeTo(m_colorField);

        m_popup.setModal(false);
        if (m_popup.getWidgetCount() != 0) {
            m_popup.remove(m_popup.getWidget(0));
        }
        CmsColorSelector picker = new CmsColorSelector();
        try {
            picker.setHex(m_textboxColorValue.getText().replace("#", ""));
        } catch (Exception e) {
            // TODO: Auto-generated catch block
        }
        m_popup.add(picker);
        if (m_count == 0) {
            CmsPushButton close = new CmsPushButton();
            CmsPushButton cancel = new CmsPushButton();
            cancel.setText(Messages.get().key(Messages.GUI_CANCEL_0));
            cancel.setTitle(Messages.get().key(Messages.GUI_CANCEL_0));
            close.setText(Messages.get().key(Messages.GUI_OK_0));
            close.setTitle(Messages.get().key(Messages.GUI_OK_0));
            close.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    closePopup();

                }
            });
            cancel.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    closePopupDefault();

                }
            });
            m_popup.addButton(cancel);
            m_popup.addButton(close);
            m_count = 1;
        }

        m_xcoordspopup = m_popup.getPopupLeft();
        m_ycoordspopup = m_popup.getPopupTop();

    }
765661
protected void openDialog(I_CmsGalleryConfiguration configuration) {

        Document.get().getBody().addClassName(I_CmsButton.ButtonData.WAND_BUTTON.getIconClass());
        if (m_dialog == null) {
            SimplePanel tabsContainer = new SimplePanel();
            tabsContainer.addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().menuTabContainer());
            int dialogHeight = CmsToolbarPopup.getAvailableHeight();
            int dialogWidth = CmsToolbarPopup.getAvailableWidth();
            m_dialog = createDialog(configuration, new I_CmsGalleryHandler() {

                public boolean filterDnd(CmsResultItemBean resultBean) {

                    return CmsGwtConstants.TYPE_IMAGE.equals(resultBean.getType());
                }

                public Widget getAdditionalTypeTabControl() {

                    return null;
                }

                public I_CmsAutoHider getAutoHideParent() {

                    return getPopup();
                }

                public CmsDNDHandler getDndHandler() {

                    return CmsContainerpageController.get().getDndHandler();
                }

                public void processResultItem(CmsResultListItem item) {

                    item.setData(DND_MARKER);
                    item.setDndHelperClass("imagedrag");
                    item.setDndParentClass(
                        "imageparent "
                            + org.opencms.ade.galleries.client.ui.css.I_CmsLayoutBundle.INSTANCE.galleryResultItemCss().tilingList());
                    //item.setDragHelperTransformer(DRAG_HELPER_TRANSFORMER);
                }

            });
            m_dialog.setDialogSize(dialogWidth, dialogHeight);
            getPopup().setWidth(dialogWidth);
            tabsContainer.add(m_dialog);
            m_contentPanel.add(tabsContainer);
        } else {
            int dialogWidth = CmsToolbarPopup.getAvailableWidth();
            getPopup().setWidth(dialogWidth);
            m_dialog.truncate("GALLERY_DIALOG_TM", dialogWidth);
            m_dialog.updateSizes();
        }
    }
1316665
function QuickOpenPlugin(name, languageIds, done, search, match, itemFocus, itemSelect, resultsFormatter, matcherOptions, label) {
        this.name = name;
        this.languageIds = languageIds;
        this.done = done;
        this.search = search;
        this.match = match;
        this.itemFocus = itemFocus;
        this.itemSelect = itemSelect;
        this.resultsFormatter = resultsFormatter;
        this.matcherOptions = matcherOptions;
        this.label = label;
    }
587955
def connectToDebugger(self, debuggerPort, debugger_options=None):
        '''
        
        '''

        if debugger_options is None:
            debugger_options = {}
        env_key = "PYDEVD_EXTRA_ENVS"
        if env_key in debugger_options:
            for (env_name, value) in dict_iter_items(debugger_options[env_key]):
                existing_value = os.environ.get(env_name, None)
                if existing_value:
                    os.environ[env_name] = "%s%c%s" % (existing_value, os.path.pathsep, value)
                else:
                    os.environ[env_name] = value
                if env_name == "PYTHONPATH":
                    sys.path.append(value)

            del debugger_options[env_key]

        def do_connect_to_debugger():
            try:
                # Try to import the packages needed to attach the debugger
                import pydevd
                from _pydev_imps._pydev_saved_modules import threading

            except:
                # This happens on Jython embedded in host eclipse
                traceback.print_exc()
                sys.stderr.write('pydevd is not available, cannot connect\n', )

            from _pydevd_bundle.pydevd_constants import set_thread_id
            from _pydev_bundle import pydev_localhost
            set_thread_id(threading.currentThread(), "console_main")

            VIRTUAL_FRAME_ID = "1"  # matches PyStackFrameConsole.java
            VIRTUAL_CONSOLE_ID = "console_main"  # matches PyThreadConsole.java
            f = FakeFrame()
            f.f_back = None
            f.f_globals = {}  # As globals=locals here, let's simply let it empty (and save a bit of network traffic).
            f.f_locals = self.get_namespace()

            self.debugger = pydevd.PyDB()
            self.debugger.add_fake_frame(thread_id=VIRTUAL_CONSOLE_ID, frame_id=VIRTUAL_FRAME_ID, frame=f)
            try:
                pydevd.apply_debugger_options(debugger_options)
                self.debugger.connect(pydev_localhost.get_localhost(), debuggerPort)
                self.debugger.prepare_to_run()
                self.debugger.disable_tracing()
            except:
                traceback.print_exc()
                sys.stderr.write('Failed to connect to target debugger.\n')

            # Register to process commands when idle
            self.debugrunning = False
            try:
                import pydevconsole
                pydevconsole.set_debug_hook(self.debugger.process_internal_commands)
            except:
                traceback.print_exc()
                sys.stderr.write('Version of Python does not support debuggable Interactive Console.\n')

        # Important: it has to be really enabled in the main thread, so, schedule
        # it to run in the main thread.
        self.exec_queue.put(do_connect_to_debugger)

        return ('connect complete',)
529875
private void open(IStructuredSelection selection) throws IOException,
      PartInitException, InvocationTargetException, InterruptedException {

    for (DFSFile file : filterSelection(DFSFile.class, selection)) {

      IStorageEditorInput editorInput = new DFSFileEditorInput(file);
      targetPart.getSite().getWorkbenchWindow().getActivePage().openEditor(
          editorInput, "org.eclipse.ui.DefaultTextEditor");
    }
  }