For more info, see: https://tox.readthedocs.io/en/latest/plugins.html
    For an example, see: https://github.com/tox-dev/tox-travis
429236
def tox_configure(config):
    
    sections = config._cfg.sections

    # Cache these
    make_envconfig = None
    reader = None

    # Default to false so:
    # 1. we don't affect other projects using tox
    # 2. check migrations can happen gradually
    if str(sections.get('testenv', {}).get(STYLE_FLAG, 'false')).lower() == 'true':
        # Disable flake8 since we already include that
        config.envlist[:] = [env for env in config.envlist if not env.endswith('flake8')]

        make_envconfig = get_make_envconfig(make_envconfig)
        reader = get_reader(reader, config)

        add_style_checker(config, sections, make_envconfig, reader)
        add_style_formatter(config, sections, make_envconfig, reader)
1066043
def _buildTemplates(self):
        
        # INDEX - MAIN PAGE
        contents = self._renderTemplate("html-multi/index.html", extraContext={"theme": self.theme, "index_page_flag" : True})
        FILE_NAME = "index.html"
        main_url = self._save2File(contents, FILE_NAME, self.output_path)

        # DASHBOARD
        contents = self._renderTemplate("html-multi/statistics.html", extraContext={"theme": self.theme})
        FILE_NAME = "statistics.html"
        self._save2File(contents, FILE_NAME, self.output_path)

        # VIZ LIST
        if False:
            contents = self._renderTemplate("html-multi/viz_list.html", extraContext={"theme": self.theme})
            FILE_NAME = "visualizations.html"
            self._save2File(contents, FILE_NAME, self.output_path)


        browser_output_path = self.output_path

        # ENTITIES A-Z
        extra_context = {"ontograph": self.ontospy_graph, "theme": self.theme}
        contents = self._renderTemplate("html-multi/browser/browser_entities_az.html", extraContext=extra_context)
        FILE_NAME = "entities-az.html"
        self._save2File(contents, FILE_NAME, browser_output_path)



        if self.ontospy_graph.all_classes:
            # CLASSES = ENTITIES TREE
            extra_context = {"ontograph": self.ontospy_graph, "theme": self.theme,
                            "treetype" : "classes",
                'treeTable' : formatHTML_EntityTreeTable(self.ontospy_graph.ontologyClassTree())}
            contents = self._renderTemplate("html-multi/browser/browser_entities_tree.html", extraContext=extra_context)
            FILE_NAME = "entities-tree-classes.html"
            self._save2File(contents, FILE_NAME, browser_output_path)
            # BROWSER PAGES - CLASSES ======
            for entity in self.ontospy_graph.all_classes:
                extra_context = {"main_entity": entity,
                                "main_entity_type": "class",
                                "theme": self.theme,
                                "ontograph": self.ontospy_graph
                                }
                extra_context.update(self.highlight_code(entity))
                contents = self._renderTemplate("html-multi/browser/browser_classinfo.html", extraContext=extra_context)
                FILE_NAME = entity.slug + ".html"
                self._save2File(contents, FILE_NAME, browser_output_path)


        if self.ontospy_graph.all_properties:

            # PROPERTIES = ENTITIES TREE
            extra_context = {"ontograph": self.ontospy_graph, "theme": self.theme,
                            "treetype" : "properties",
                'treeTable' : formatHTML_EntityTreeTable(self.ontospy_graph.ontologyPropTree())}
            contents = self._renderTemplate("html-multi/browser/browser_entities_tree.html", extraContext=extra_context)
            FILE_NAME = "entities-tree-properties.html"
            self._save2File(contents, FILE_NAME, browser_output_path)

            # BROWSER PAGES - PROPERTIES ======

            for entity in self.ontospy_graph.all_properties:
                extra_context = {"main_entity": entity,
                                "main_entity_type": "property",
                                "theme": self.theme,
                                "ontograph": self.ontospy_graph
                                }
                extra_context.update(self.highlight_code(entity))
                contents = self._renderTemplate("html-multi/browser/browser_propinfo.html", extraContext=extra_context)
                FILE_NAME = entity.slug + ".html"
                self._save2File(contents, FILE_NAME, browser_output_path)


        if self.ontospy_graph.all_skos_concepts:

            # CONCEPTS = ENTITIES TREE

            extra_context = {"ontograph": self.ontospy_graph, "theme": self.theme,
                            "treetype" : "concepts",
                'treeTable' : formatHTML_EntityTreeTable(self.ontospy_graph.ontologyConceptTree())}
            contents = self._renderTemplate("html-multi/browser/browser_entities_tree.html", extraContext=extra_context)
            FILE_NAME = "entities-tree-concepts.html"
            self._save2File(contents, FILE_NAME, browser_output_path)

            # BROWSER PAGES - CONCEPTS ======

            for entity in self.ontospy_graph.all_skos_concepts:
                extra_context = {"main_entity": entity,
                                "main_entity_type": "concept",
                                "theme": self.theme,
                                "ontograph": self.ontospy_graph
                                }
                extra_context.update(self.highlight_code(entity))
                contents = self._renderTemplate("html-multi/browser/browser_conceptinfo.html", extraContext=extra_context)
                FILE_NAME = entity.slug + ".html"
                self._save2File(contents, FILE_NAME, browser_output_path)


        if self.ontospy_graph.all_shapes:

            # SHAPES = ENTITIES TREE

            extra_context = {"ontograph": self.ontospy_graph, "theme": self.theme,
                            "treetype" : "shapes", 'treeTable' : formatHTML_EntityTreeTable(self.ontospy_graph.ontologyShapeTree()) }
            contents = self._renderTemplate("html-multi/browser/browser_entities_tree.html", extraContext=extra_context)
            FILE_NAME = "entities-tree-shapes.html"
            self._save2File(contents, FILE_NAME, browser_output_path)

            # BROWSER PAGES - SHAPES ======

            for entity in self.ontospy_graph.all_shapes:
                extra_context = {"main_entity": entity,
                                "main_entity_type": "shape",
                                "theme": self.theme,
                                "ontograph": self.ontospy_graph
                                }
                extra_context.update(self.highlight_code(entity))
                contents = self._renderTemplate("html-multi/browser/browser_shapeinfo.html", extraContext=extra_context)
                FILE_NAME = entity.slug + ".html"
                self._save2File(contents, FILE_NAME, browser_output_path)


        return main_url
1176605
function (obj) {
  var toc = [],
    tocTmpl = _.template("* [<%= heading %>](#<%= id %>)\n"),
    sectionTmpl = _.template("### <%= summary %>\n\n<%= body %>\n");

  // Finesse comment markdown data.
  // Also, statefully create TOC.
  var sections = _.chain(obj)
    .filter(function (c) {
      return !c.isPrivate && !c.ignore && _.any(c.tags, function (t) {
        return t.type === "api" && t.visibility === "public";
      });
    })
    .map(function (c) {
      // Add to TOC.
      toc.push(tocTmpl({
        heading: c.description.summary,
        id: _headingId(c.description.summary)
      }));

      return sectionTmpl(c.description);
    })
    .value()
    .join("");

  return "\n" + toc.join("") + "\n" + sections;
}
8831
def render_toctrees(kb_app: kb, sphinx_app: Sphinx, doctree: doctree,
                    fromdocname: str):
    

    # Only do any of this if toctree support is turned on in KaybeeSettings.
    # By default, this is off.
    settings: KaybeeSettings = sphinx_app.config.kaybee_settings
    if not settings.articles.use_toctree:
        return

    # Setup a template and context
    builder: StandaloneHTMLBuilder = sphinx_app.builder
    env: BuildEnvironment = sphinx_app.env

    # Toctree support. First, get the registered toctree class, if any
    registered_toctree = ToctreeAction.get_for_context(kb_app)
    for node in doctree.traverse(toctree):
        if node.attributes['hidden']:
            continue
        custom_toctree = registered_toctree(fromdocname)
        context = builder.globalcontext.copy()
        context['sphinx_app'] = sphinx_app

        # Get the toctree entries. We only handle one level of depth for
        # now. To go further, we need to recurse like sphinx's
        # adapters.toctree._toctree_add_classes function
        entries = node.attributes['entries']

        # The challenge here is that some items in a toctree
        # might not be resources in our "database". So we have
        # to ask Sphinx to get us the titles.
        custom_toctree.set_entries(entries, env.titles,
                                   sphinx_app.env.resources)
        output = custom_toctree.render(builder, context, sphinx_app)

        # Put the output into the node contents
        listing = [nodes.raw('', output, format='html')]
        node.replace_self(listing)
975688
function() {

        var planes = {
            'px': createPlane('px', this.depthSegments, this.heightSegments),
            'nx': createPlane('nx', this.depthSegments, this.heightSegments),
            'py': createPlane('py', this.widthSegments, this.depthSegments),
            'ny': createPlane('ny', this.widthSegments, this.depthSegments),
            'pz': createPlane('pz', this.widthSegments, this.heightSegments),
            'nz': createPlane('nz', this.widthSegments, this.heightSegments),
        };

        var attrList = ['position', 'texcoord0', 'normal'];
        var vertexNumber = 0;
        var faceNumber = 0;
        for (var pos in planes) {
            vertexNumber += planes[pos].vertexCount;
            faceNumber += planes[pos].indices.length;
        }
        for (var k = 0; k < attrList.length; k++) {
            this.attributes[attrList[k]].init(vertexNumber);
        }
        this.indices = new vendor.Uint16Array(faceNumber);
        var faceOffset = 0;
        var vertexOffset = 0;
        for (var pos in planes) {
            var plane = planes[pos];
            for (var k = 0; k < attrList.length; k++) {
                var attrName = attrList[k];
                var attrArray = plane.attributes[attrName].value;
                var attrSize = plane.attributes[attrName].size;
                var isNormal = attrName === 'normal';
                for (var i = 0; i < attrArray.length; i++) {
                    var value = attrArray[i];
                    if (this.inside && isNormal) {
                        value = -value;
                    }
                    this.attributes[attrName].value[i + attrSize * vertexOffset] = value;
                }
            }
            var len = plane.indices.length;
            for (var i = 0; i < plane.indices.length; i++) {
                this.indices[i + faceOffset] = vertexOffset + plane.indices[this.inside ? (len - i - 1) : i];
            }
            faceOffset += plane.indices.length;
            vertexOffset += plane.vertexCount;
        }

        this.boundingBox = new BoundingBox();
        this.boundingBox.max.set(1, 1, 1);
        this.boundingBox.min.set(-1, -1, -1);
    }
1292202
def tox(args=''):
    '''
    '''
    basedir = dirname(__file__)

    latest_pythons = _determine_latest_pythons()
    # e.g. highest_minor_python: '3.6'
    highest_minor_python = _highest_minor(latest_pythons)

    _local_needs_pythons(flo('cd {basedir}  &&  '
                             'python{highest_minor_python} -m tox {args}'))
841350
def read_description():
    
    with open(os.path.join(os.path.dirname(__file__), "README.rst"), encoding="utf-8") as f:
        description = f.read()

    # Link to the documentation of the specific version.
    description = description.replace(
        "//python-chess.readthedocs.io/en/latest/",
        "//python-chess.readthedocs.io/en/v{}/".format(chess.__version__))

    # Use documentation badge for the specific version.
    description = description.replace(
        "//readthedocs.org/projects/python-chess/badge/?version=latest",
        "//readthedocs.org/projects/python-chess/badge/?version=v{}".format(chess.__version__))

    # Show Travis CI build status of the concrete version.
    description = description.replace(
        "//travis-ci.org/niklasf/python-chess.svg?branch=master",
        "//travis-ci.org/niklasf/python-chess.svg?branch=v{}".format(chess.__version__))

    # Show Appveyor build status of the concrete version.
    description = description.replace(
        "/y9k3hdbm0f0nbum9/branch/master",
        "/y9k3hdbm0f0nbum9/branch/v{}".format(chess.__version__))

    # Remove doctest comments.
    description = re.sub(r"\s*# doctest:.*", "", description)

    return description
1181071
function fictionalDatabaseWithTodos(cb) {
  var tasks = [
    ['Write readme'],
    ['Create react plugin', true],
    ['Write blog post'],
    ['Add the flux-todomvc example', true],
    ['Add the flux-chat example'],
    ['Release new pakage on npm']
  ]

  var todos = tasks.reduce(function (obj, args) {
    var todo = createTodo.apply(null, args)
    obj[todo.id] = todo
    return obj
  }, {})

  setTimeout(function () {
    cb(todos)
  }, 100)
}
450788
def check_mods_docs_readme():
    

    docs_mods = []

    readme_fn = os.path.join( os.path.dirname(config.MULTIQC_DIR), 'docs', 'README.md')
    if not os.path.isfile(readme_fn):
        if os.environ.get('TRAVIS_BUILD_DIR') is not None:
            readme_fn = os.path.join( os.environ.get('TRAVIS_BUILD_DIR'), 'docs', 'README.md')
        else:
            logger.warn("Can't check docs readme in lint test as file doesn't exist: {}".format(readme_fn))
            return None
    with open(readme_fn) as f:
        fm = next(yaml.load_all(f, Loader=yaml.SafeLoader))

    for section in fm['MultiQC Modules']:
        for name, fn in fm['MultiQC Modules'][section].items():
            # remove modules/ and .md
            docs_mods.append(fn[8:-3])

    # Check that installed modules are listed in docs/README.md
    for m in config.avail_modules.keys():
        if m not in docs_mods and m != 'custom_content':
            errmsg = "LINT: Module '{}' found in installed modules, but not docs/README.md".format(m)
            logger.error(errmsg)
            report.lint_errors.append(errmsg)

    # Check that modules in docs/README.md are installed
    for m in docs_mods:
        if m not in config.avail_modules.keys() and m != 'custom_content':
            errmsg = "LINT: Module '{}' found in docs/README.md, but not installed modules".format(m)
            logger.error(errmsg)
            report.lint_errors.append(errmsg)
774566
def _ctxs(self):
        
        return [self._tab_widget.widget(index).context for index in range(0, self._tab_widget.count())]
688965
def createRPYText(self):
        ''''''
        self.rollText = self.axes.text(self.leftPos+(self.vertSize/10.0),-0.97+(2*self.vertSize)-(self.vertSize/10.0),'Roll:   %.2f' % self.roll,color='w',size=self.fontSize)
        self.pitchText = self.axes.text(self.leftPos+(self.vertSize/10.0),-0.97+self.vertSize-(0.5*self.vertSize/10.0),'Pitch: %.2f' % self.pitch,color='w',size=self.fontSize)
        self.yawText = self.axes.text(self.leftPos+(self.vertSize/10.0),-0.97,'Yaw:   %.2f' % self.yaw,color='w',size=self.fontSize)
        self.rollText.set_path_effects([PathEffects.withStroke(linewidth=1,foreground='k')])
        self.pitchText.set_path_effects([PathEffects.withStroke(linewidth=1,foreground='k')])
        self.yawText.set_path_effects([PathEffects.withStroke(linewidth=1,foreground='k')])
176126
function(io) {
    var feature_hashes = [];
    var uri, feature_hash, current_step_or_hook;

    this.done = function() {
        io.write(JSON.stringify(feature_hashes, null, 2));
    };

    this.uri = function(_uri) {
        uri = _uri;
    };
    
    this.feature = function(feature) {
        feature_hash = feature;
        feature_hash['uri'] = uri;
        feature_hashes.push(feature_hash);
    };

    this.background = function(background) {
        feature_elements().push(background);
    };
    
    this.scenario = function(scenario) {
        feature_elements().push(scenario);
    };

    this.scenario_outline = function(scenario_outline) {
        feature_elements().push(scenario_outline);
    };

    this.examples = function(examples) {
        all_examples().push(examples);
    };

    this.step = function(step) {
        current_step_or_hook = step;
        steps().push(current_step_or_hook);
    }
    
    this.match = function(match) {
        current_step_or_hook['match'] = match;
    }

    this.result = function(result) {
        current_step_or_hook['result'] = result;
    }

    this.before = function(match, result) {
        add_hook(match, result, "before");
    }

    this.after = function(match, result) {
        add_hook(match, result, "after");
    }

    this.embedding = function(mime_type, data) {
        embeddings().push({'mime_type': mime_type, 'data': encode64s(data)})
    }

    this.write = function(text) {
        output().push(text);
    };

    this.eof = function() {};

    this.append_duration = function(timestamp) {
        if (current_step_or_hook['result']) {
            timestamp = timestamp * 1000000000
            rshash = current_step_or_hook['result']
            rshash['duration'] = timestamp
            current_step_or_hook['result'] = rshash
        }
    }

    // "private" methods

    function add_hook(match, result, hook) {
        if(!feature_element()[hook]) {
            feature_element()[hook] = [];
        }
        var hooks = feature_element()[hook];
        hooks.push({'match': match, 'result': result});
    }

    function feature_elements() {
        if(!feature_hash['elements']) {
            feature_hash['elements'] = [];
        }
        return feature_hash['elements'];
    }

    function feature_element() {
        return feature_elements()[feature_elements().length - 1];
    }

    function all_examples() {
        if(!feature_element()['examples']) {
            feature_element()['examples'] = [];
        }
        return feature_element()['examples'];
    }

    function steps() {
        if(!feature_element()['steps']) {
            feature_element()['steps'] = [];
        }
        return feature_element()['steps'];
    }

    function embeddings() {
        if(!current_step_or_hook['embeddings']) {
            current_step_or_hook['embeddings'] = [];
        }
        return current_step_or_hook['embeddings'];
    }

    function output() {
        if(!current_step_or_hook['output']) {
            current_step_or_hook['output'] = [];
        }
        return current_step_or_hook['output'];
    }
    
    // http://gitorious.org/javascript-base64/javascript-base64/blobs/master/base64.js
    function encode64s(input) {
        var swaps = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];
        var input_binary = "";
        var output = "";
        var temp_binary;
        var index;
        for (index=0; index < input.length; index++) {
            temp_binary = input.charCodeAt(index).toString(2);
            while (temp_binary.length < 8) {
                temp_binary = "0"+temp_binary;
            }
            input_binary = input_binary + temp_binary;
            while (input_binary.length >= 6) {
                output = output + swaps[parseInt(input_binary.substring(0,6),2)];
                input_binary = input_binary.substring(6);
            }
        }
        if (input_binary.length == 4) {
            temp_binary = input_binary + "00";
            output = output + swaps[parseInt(temp_binary,2)];
            output = output + "=";
        }
        if (input_binary.length == 2) {
            temp_binary = input_binary + "0000";
            output = output + swaps[parseInt(temp_binary,2)];
            output = output + "==";
        }
        return output;
    }
}
333072
def _buildTemplates(self):
        

        c_mylist = build_D3treeStandard(0, 99, 1,
                                        self.ontospy_graph.toplayer_classes)
        p_mylist = build_D3treeStandard(0, 99, 1,
                                        self.ontospy_graph.toplayer_properties)
        s_mylist = build_D3treeStandard(0, 99, 1,
                                        self.ontospy_graph.toplayer_skos)

        c_total = len(self.ontospy_graph.all_classes)
        p_total = len(self.ontospy_graph.all_properties)
        s_total = len(self.ontospy_graph.all_skos_concepts)

        if False:
            # testing how a single tree would look like
            JSON_DATA_CLASSES = json.dumps({
                'children': [{
                    'children': c_mylist,
                    'name': 'Classes',
                    'id': "classes"
                },
                             {
                                 'children': p_mylist,
                                 'name': 'Properties',
                                 'id': "properties"
                             },
                             {
                                 'children': s_mylist,
                                 'name': 'Concepts',
                                 'id': "concepts"
                             }],
                'name':
                'Entities',
                'id':
                "root"
            })

        # hack to make sure that we have a default top level object
        JSON_DATA_CLASSES = json.dumps({
            'children': c_mylist,
            'name': 'owl:Thing',
            'id': "None"
        })
        JSON_DATA_PROPERTIES = json.dumps({
            'children': p_mylist,
            'name': 'Properties',
            'id': "None"
        })
        JSON_DATA_CONCEPTS = json.dumps({
            'children': s_mylist,
            'name': 'Concepts',
            'id': "None"
        })

        extra_context = {
            "ontograph": self.ontospy_graph,
            "TOTAL_CLASSES": c_total,
            "TOTAL_PROPERTIES": p_total,
            "TOTAL_CONCEPTS": s_total,
            'JSON_DATA_CLASSES': JSON_DATA_CLASSES,
            'JSON_DATA_PROPERTIES': JSON_DATA_PROPERTIES,
            'JSON_DATA_CONCEPTS': JSON_DATA_CONCEPTS,
        }

        # Ontology - MAIN PAGE
        contents = self._renderTemplate(
            "d3/d3tree.html", extraContext=extra_context)
        FILE_NAME = "index.html"
        main_url = self._save2File(contents, FILE_NAME, self.output_path)

        return main_url
1208033
def generate_doxygen_xml(app):
    """"""
    read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
    if read_the_docs_build:
        run_doxygen('..')
        sys.stderr.write('Check if shared lib exists\n')
        run_build_lib('..')
    sys.stderr.write('The wrapper path: %s\n' % str(os.listdir('../wrapper')))
    rabit._loadlib()
1153083
def setup(app):
    

    app.add_directive('readthedocs-embed', EmbedDirective)
    app.add_config_value('readthedocs_embed_project', '', 'html')
    app.add_config_value('readthedocs_embed_version', '', 'html')
    app.add_config_value('readthedocs_embed_doc', '', 'html')

    return app
374641
function() {
	        // actions for the renderer
			var switchViewCommand = new mCommands.Command({
				tooltip : messages["viewByTypesTooltip"],
				name: messages["viewByTypes"],
				imageClass : "problems-sprite-view-mode", //$NON-NLS-1$
	            id: "orion.problemsView.switchView", //$NON-NLS-1$
	            groupId: "orion.problemsViewGroup", //$NON-NLS-1$
				type: "switch", //$NON-NLS-1$
				checked: this._viewByFile,
				visibleWhen: function(/*item*/) {
					switchViewCommand.checked = this._viewByFile;
					switchViewCommand.name = this._viewByFile ? messages["viewByTypes"] : messages["viewByFiles"];
					switchViewCommand.tooltip = this._viewByFile ? messages["viewByTypesTooltip"] : messages["viewByFilesTooltip"];
					return this.getItemCount() > 0;
				}.bind(this),
				callback : /* @callback */ function(data) {
					this.switchViewMode();
			}.bind(this)});
	        var nextResultCommand = new mCommands.Command({
	            name: sharedMessages["Next result"],
	            tooltip: sharedMessages["Next result"],
	            imageClass: "core-sprite-move-down", //$NON-NLS-1$
	            id: "orion.problemsView.nextResult", //$NON-NLS-1$
	            groupId: "orion.problemsViewGroup", //$NON-NLS-1$
	            visibleWhen: function(/*item*/) {
	                return this.getItemCount() > 0;
	            }.bind(this),
	            callback: function() {
	                this.gotoNext(true, true);
	            }.bind(this)
	        });
	        var prevResultCommand = new mCommands.Command({
	            name: sharedMessages["Previous result"],
	            tooltip: sharedMessages["Previous result"],
	            imageClass: "core-sprite-move-up", //$NON-NLS-1$
	            id: "orion.problemsView.prevResult", //$NON-NLS-1$
	            groupId: "orion.problemsViewGroup", //$NON-NLS-1$
	            visibleWhen: function(/*item*/) {
	                return this.getItemCount() > 0;
	            }.bind(this),
	            callback: function() {
	                this.gotoNext(false, true);
	            }.bind(this)
	        });
	        
	        var switchFullPathCommand = new mCommands.Command({
	        	name: sharedMessages["fullPath"],
	            tooltip: sharedMessages["switchFullPath"],
	            imageClass : "sprite-switch-full-path", //$NON-NLS-1$
	            id: "orion.problemsView.switchFullPath", //$NON-NLS-1$
	            groupId: "orion.problemsViewGroup", //$NON-NLS-1$
	            type: "switch", //$NON-NLS-1$
	            checked: this._shouldShowFullPath,
	            visibleWhen: function(/*item*/) {
	                return this._viewByFile && this.getItemCount() > 0;
	            }.bind(this),
	            callback: function() {
	                this.switchFullPath();
	            }.bind(this)
	        });
	        
	        var refreshCommand = new mCommands.Command({
	        	name: messages["Refresh"],
	            tooltip: messages["RefreshTooltip"],
	            id: "orion.problemsView.refresh", //$NON-NLS-1$
	            groupId: "orion.problemsViewGroup", //$NON-NLS-1$
	            visibleWhen: function(/*item*/) {
	                return true;
	            }.bind(this),
	            callback: function() {
	                this.validate();
	            }.bind(this)
	        });
	        
	        this.commandService.addCommand(switchViewCommand);
	        this.commandService.addCommand(nextResultCommand);
	        this.commandService.addCommand(prevResultCommand);
	        this.commandService.addCommand(switchFullPathCommand);
	        this.commandService.addCommand(refreshCommand);
	        
	        this.commandService.addCommandGroup("problemsViewActions", "orion.problemsViewActions.unlabeled", 200); //$NON-NLS-1$ //$NON-NLS-2$
	        
	        mExplorer.createExplorerCommands(this.commandService, function(/*item*/) {
	        	return this.getItemCount() > 0;
	        }.bind(this), "orion.explorer.problems.expandAll", "orion.explorer.problems.collapseAll"); //$NON-NLS-1$ //$NON-NLS-2$
	        
	        this.commandService.registerCommandContribution("problemsViewActions", "orion.problemsView.switchView", 1); //$NON-NLS-1$ //$NON-NLS-2$
	        this.commandService.registerCommandContribution("problemsViewActions", "orion.explorer.problems.expandAll", 2); //$NON-NLS-1$ //$NON-NLS-2$
	        this.commandService.registerCommandContribution("problemsViewActions", "orion.explorer.problems.collapseAll", 3); //$NON-NLS-1$ //$NON-NLS-2$
	        this.commandService.registerCommandContribution("problemsViewActions", "orion.problemsView.nextResult", 4); //$NON-NLS-1$ //$NON-NLS-2$
	        this.commandService.registerCommandContribution("problemsViewActions", "orion.problemsView.prevResult", 5); //$NON-NLS-1$ //$NON-NLS-2$
	        this.commandService.registerCommandContribution("problemsViewActions", "orion.problemsView.switchFullPath", 6); //$NON-NLS-1$ //$NON-NLS-2$
	        this.commandService.registerCommandContribution("problemsViewActionsRight", "orion.problemsView.refresh", 7); //$NON-NLS-1$ //$NON-NLS-2$
	    }
113175
def process_token(self, tok):
        """"""
        if tok[0] == Token.Text:
            count = tok[1].count('\n')
            if count:
                self._line += count  # adjust linecount

        if self._detector.process(tok):
            pass  # works been completed in the detector
        elif tok[0] == Token.Punctuation:
            if tok[0] == Token.Punctuation and tok[1] == '{':
                self._scope += 1
            if tok[0] == Token.Punctuation and tok[1] == '}':
                self._scope += -1
                if self._scope == 0 and self._curr is not None:
                    self._curr['end'] = self._line  # close last scope
                    self._curr = None
        elif tok[0] == Token.Name.Class and self._scope == 0:
            self.add_scope('Class', tok[1], self._line)
        elif tok[0] == Token.Name.Function and self._scope in [0, 1]:
            self.add_scope('Function', tok[1], self._line, self._scope == 1)