Package org.eclipse.ltk.core.refactoring

Examples of org.eclipse.ltk.core.refactoring.RefactoringStatus


    public RefactoringStatus checkInitialConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        if (sel instanceof IErlMemberSelection) {
            // SelectionKind kind = sel.getDetailedKind();
            return new RefactoringStatus();
        }

        return RefactoringStatus.createFatalErrorStatus("Please select a variable!");
    }
View Full Code Here


            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        final IRefactoringRpcMessage message = run(sel);
        if (message.isSuccessful()) {
            changedFiles = message.getRefactoringChangeset();
            return new RefactoringStatus();
        }
        return RefactoringStatus.createFatalErrorStatus(message.getMessageString());
    }
View Full Code Here

            positions = m.getPositionDefinitions(sel.getDocument());
            selectedPositions = new ArrayList<IErlRange>();
        } else {
            return RefactoringStatus.createFatalErrorStatus(m.getMessageString());
        }
        return new RefactoringStatus();
    }
View Full Code Here

    @Override
    public RefactoringStatus checkInitialConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        // FIXME: what are the preconditions? add them!
        return new RefactoringStatus();
    }
View Full Code Here

            public void doRefactoring() {
                final IErlSelection sel = GlobalParameters.getWranglerSelection();
                RefactoringRpcMessage message = (RefactoringRpcMessage) run(sel);
                if (message.isSuccessful()) {
                    changedFiles = message.getRefactoringChangeset();
                    status = new RefactoringStatus();
                } else if (message.getRefactoringState() == RefactoringState.QUESTION) {
                    if (ask("Question", message.getMessageString())) {
                        final OtpErlangTuple res = message.getResultObject();
                        expr = ((OtpErlangTuple) res.elementAt(2)).elementAt(0);
                        parentExpr = ((OtpErlangTuple) res.elementAt(2)).elementAt(1);
                        message = (RefactoringRpcMessage) runAlternative(sel);
                        if (message.isSuccessful()) {
                            status = new RefactoringStatus();
                            changedFiles = message.getRefactoringChangeset();
                        } else {
                            status = RefactoringStatus.createFatalErrorStatus(message
                                    .getMessageString());
                        }
View Full Code Here

                .getKind() == SelectionKind.FUNCTION_CLAUSE))) {
            return RefactoringStatus
                    .createFatalErrorStatus("Please select an expression!");
        }

        return new RefactoringStatus();
    }
View Full Code Here

            public void doRefactoring() {
                final IErlSelection sel = GlobalParameters.getWranglerSelection();
                IRefactoringRpcMessage message = run(sel);
                if (message.isSuccessful()) {
                    changedFiles = message.getRefactoringChangeset();
                    status = new RefactoringStatus();
                } else if (message.getRefactoringState() == RefactoringState.WARNING) {
                    final boolean answer = !ask("Warning", message.getMessageString());
                    if (answer) {
                        message = runAlternative(sel);
                        if (message.getRefactoringState() == RefactoringState.OK) {
                            status = new RefactoringStatus();
                        } else {
                            status = RefactoringStatus.createFatalErrorStatus(message
                                    .getMessageString());
                        }
                    } else {
View Full Code Here

            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        if (sel instanceof IErlMemberSelection) {
            final SelectionKind kind = sel.getKind();
            if (kind == SelectionKind.FUNCTION_CLAUSE || kind == SelectionKind.FUNCTION) {
                return new RefactoringStatus();
            }
        }

        return RefactoringStatus
                .createFatalErrorStatus("Please select a record expression!");
View Full Code Here

        if (sel instanceof IErlMemberSelection) {
            /*
             * if (sel.getKind() == SelectionKind.FUNCTION || sel.getKind() ==
             * SelectionKind.FUNCTION_CLAUSE)
             */
            return new RefactoringStatus();
        }

        return RefactoringStatus.createFatalErrorStatus("Please select a function!");
    }
View Full Code Here

    }

    @Override
    public RefactoringStatus checkInitialConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        return new RefactoringStatus(); // OK, no preconditins
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ltk.core.refactoring.RefactoringStatus

Copyright © 2018 www.massapicom. 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.