Package org.eclipse.ltk.core.refactoring

Examples of org.eclipse.ltk.core.refactoring.RefactoringStatus.addFatalError()


                status.addFatalError("The token: " + request.initialName + " cannot be renamed.");
                return status;
            }

            if (request.inputName != null && !StringUtils.isWord(request.inputName)) {
                status.addFatalError("The new name is not valid:" + request.inputName);
                return status;
            }

            SimpleNode ast = request.getAST();
            if (ast == null) {
View Full Code Here


                return status;
            }

            SimpleNode ast = request.getAST();
            if (ast == null) {
                status.addFatalError("AST not generated (syntax error).");
                return status;
            }
            IPyRefactoring pyRefactoring = AbstractPyRefactoring.getPyRefactoring();
            request.communicateWork("Finding definition");
            ItemPointer[] pointers = pyRefactoring.findDefinition(request);
View Full Code Here

                process.add(p);

            } else {
                for (ItemPointer pointer : pointers) {
                    if (pointer.definition == null) {
                        status.addFatalError("The definition found is not valid. " + pointer);
                    }
                    if (DEBUG) {
                        System.out.println("Found definition:" + pointer.definition);
                    }
View Full Code Here

                        System.out.println("Found definition:" + pointer.definition);
                    }

                    IRefactorRenameProcess p = RefactorProcessFactory.getProcess(pointer.definition, request);
                    if (p == null) {
                        status.addFatalError("Refactoring Process not defined: the definition found is not valid:"
                                + pointer.definition);
                        return status;
                    }
                    process.add(p);
                }
View Full Code Here

                    process.add(p);
                }
            }

            if (process == null || process.size() == 0) {
                status.addFatalError("Refactoring Process not defined: the pre-conditions were not satisfied.");
                return status;
            }

        } catch (OperationCanceledException e) {
            // OK
View Full Code Here

        request.pushMonitor(pm);
        RefactoringStatus status = new RefactoringStatus();
        try {
            if (process == null || process.size() == 0) {
                request.getMonitor().beginTask("Finding references", 1);
                status.addFatalError("Refactoring Process not defined: the refactoring cycle did not complet correctly.");
                return status;
            }
            request.getMonitor().beginTask("Finding references", process.size());

            fChange = new CompositeChange("RenameChange: '" + request.initialName + "' to '" + request.inputName + "'");
View Full Code Here

            protected RefactoringStatus validateTextField(String text) {
                RefactoringStatus status = new RefactoringStatus();
                if (StringUtils.isWord(text)) {
                    req.inputName = text;
                } else {
                    status.addFatalError("The name:" + text + " is not a valid identifier.");
                }
                return status;
            }

            public void createControl(Composite parent) {
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.