Examples of fillInitialNameAndOffset()


Examples of org.python.pydev.editor.refactoring.RefactoringRequest.fillInitialNameAndOffset()

     */
    public static RefactoringRequest getRefactoringRequest(final PyEdit pyEdit, PyRefactorAction pyRefactorAction,
            PySelection ps) throws BadLocationException, MisconfigurationException {
        final RefactoringRequest req = pyRefactorAction.getRefactoringRequest();
        req.ps = ps;
        req.fillInitialNameAndOffset();
        req.inputName = "foo";
        req.setAdditionalInfo(AstEntryRefactorerRequestConstants.FIND_DEFINITION_IN_ADDITIONAL_INFO, false);
        req.setAdditionalInfo(AstEntryRefactorerRequestConstants.FIND_REFERENCES_ONLY_IN_LOCAL_SCOPE, true);
        return req;
    }
View Full Code Here

Examples of org.python.pydev.editor.refactoring.RefactoringRequest.fillInitialNameAndOffset()

    @Override
    protected String perform(IAction action, IProgressMonitor monitor) throws Exception {
        IPyRefactoring2 r = (IPyRefactoring2) AbstractPyRefactoring.getPyRefactoring();
        RefactoringRequest req = getRefactoringRequest(new NullProgressMonitor()); //as we're doing it in the background
        req.fillInitialNameAndOffset();
        if (req.initialName != null && req.initialName.trim().length() > 0) {
            NewSearchUI.runQueryInBackground(newQuery(r, req));
        }
        return null;
    }
View Full Code Here

Examples of org.python.pydev.editor.refactoring.RefactoringRequest.fillInitialNameAndOffset()

      // file. This seems to be plenty fast for my reasonably sized project, so
      // hopefully it won't be a bottleneck for others.
      PythonNature pythonNature = PythonNature.getPythonNature(project);
      pythonNature.rebuildPath();

      request.fillInitialNameAndOffset();
      IPyRefactoring2 pyRefactoring = (IPyRefactoring2)
        AbstractPyRefactoring.getPyRefactoring();
      Map<Tuple<String,File>, HashSet<ASTEntry>> refs =
        pyRefactoring.findAllOccurrences(request);
      for (Tuple<String,File> tuple : refs.keySet()){
View Full Code Here

Examples of org.python.pydev.editor.refactoring.RefactoringRequest.fillInitialNameAndOffset()

        RefactoringRequest request = new RefactoringRequest(null, ps, nature);
        request.setAdditionalInfo(AstEntryRefactorerRequestConstants.FIND_REFERENCES_ONLY_IN_LOCAL_SCOPE,
                onlyOnLocalScope);
        request.moduleName = "foo";
        request.inputName = newName;
        request.fillInitialNameAndOffset();

        applyRenameRefactoring(request, expectError);
        String refactored = doc.get();
        if (DEBUG) {
            System.out.println(refactored);
View Full Code Here

Examples of org.python.pydev.editor.refactoring.RefactoringRequest.fillInitialNameAndOffset()

            PySelection ps = new PySelection(doc, line, col);

            RefactoringRequest request = new RefactoringRequest(null, ps, natureRefactoring);
            request.setAdditionalInfo(AstEntryRefactorerRequestConstants.FIND_REFERENCES_ONLY_IN_LOCAL_SCOPE, false);
            request.moduleName = moduleName;
            request.fillInitialNameAndOffset();

            PyRenameEntryPoint processor = new PyRenameEntryPoint(request);
            NullProgressMonitor nullProgressMonitor = new NullProgressMonitor();
            checkStatus(processor.checkInitialConditions(nullProgressMonitor), expectError);
            lastProcessorUsed = processor;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.