Package org.eclipse.ltk.core.refactoring.participants

Examples of org.eclipse.ltk.core.refactoring.participants.CopyArguments


    @Override
    public RefactoringStatus checkConditions(IProgressMonitor monitor, CheckConditionsContext context)
            throws OperationCanceledException {
        // REVIEWME: what to do w/ ResourceChangeChecker and/or ValidateEditChecker

        CopyArguments arguments = getArguments();
        Object destination = arguments.getDestination();
        if (destination == null || destination instanceof IResource == false) {
            return copyChange.getRefactorController().createRefactoringStatus(RefactoringStatus.FATAL,
                "Destination is unknown or is not a resource");
        }

        IResource resource = (IResource) destination;
        RefactoringStatus refactoringStatus = null;
        try {
            refactoringStatus = copyChange.checkConditions(resource, monitor);

            ChangeRefactorModel refactorModel = copyChange.getRefactorController().getRefactorModel();

            // the destination might have been change
            if (refactorModel.isDestinationUpdated()) {
                CopyArguments newCopyArguments = new CopyArguments(resource, arguments.getExecutionLog());
                if (logger.isInfoEnabled()) {
                    logger.info("Destination changed from '" + resource.getProjectRelativePath().toPortableString()
                            + "' to '" + refactorModel.getDestinationPath() + "'");
                }
                initialize(newCopyArguments);
View Full Code Here

TOP

Related Classes of org.eclipse.ltk.core.refactoring.participants.CopyArguments

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.