Package org.eclipse.ltk.core.refactoring

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


            if (changeCandidate == null) {
                StringBuffer strBuff = new StringBuffer(Constants.PLUGIN_NAME);
                strBuff.append(" does not support copying resource 'null' to destination '").append(
                    getRefactorModel().getDestinationPath()).append("'");
                logger.error(strBuff.toString());
                refactoringStatus.addEntry(createErrorRefactoringStatusEntry(strBuff.toString()));
                continue;
            }

            // check if resource already exists
            if (!isNameUnique(changeCandidate, monitor)) {
View Full Code Here


                strBuff.append(changeCandidate.getFullPath().toPortableString()).append(
                    "' already exists in destination project '").append(getRefactorModel().getDestinationProjectName())
                        .append("' and/or on server");
                logger.error(strBuff.toString());
                strBuff.append(".  Are you sure you want to overwrite?");
                refactoringStatus.addEntry(createWarningRefactoringStatusEntry(strBuff.toString()));
                continue;
            }

            // evaluate based on resource type
            if (changeCandidate.getType() == IResource.FILE) {
View Full Code Here

            // evaluate based on resource type
            if (changeCandidate.getType() == IResource.FILE) {
                List<RefactoringStatusEntry> entries = validateChangeFile((IFile) changeCandidate, monitor);
                for (RefactoringStatusEntry refactoringStatusEntry : entries) {
                    refactoringStatus.addEntry(refactoringStatusEntry);
                }
            } else if (changeCandidate.getType() == IResource.FOLDER) {
                List<RefactoringStatusEntry> entries = validateChangeFolder((IFolder) changeCandidate, monitor);
                for (RefactoringStatusEntry refactoringStatusEntry : entries) {
                    refactoringStatus.addEntry(refactoringStatusEntry);
View Full Code Here

                    refactoringStatus.addEntry(refactoringStatusEntry);
                }
            } else if (changeCandidate.getType() == IResource.FOLDER) {
                List<RefactoringStatusEntry> entries = validateChangeFolder((IFolder) changeCandidate, monitor);
                for (RefactoringStatusEntry refactoringStatusEntry : entries) {
                    refactoringStatus.addEntry(refactoringStatusEntry);
                }
            } else if (changeCandidate.getType() == IResource.PROJECT) {
                StringBuffer strBuff = new StringBuffer(Constants.PLUGIN_NAME);
                strBuff.append(" does not support copying project '").append(changeCandidate.getName()).append(
                    "' to destination project '").append(getRefactorModel().getDestinationProjectName()).append("'");
View Full Code Here

                StringBuffer strBuff = new StringBuffer(Constants.PLUGIN_NAME);
                strBuff.append(" does not support copying project '").append(changeCandidate.getName()).append(
                    "' to destination project '").append(getRefactorModel().getDestinationProjectName()).append("'");

                logger.error(strBuff.toString());
                refactoringStatus.addEntry(createFatalRefactoringStatusEntry(strBuff.toString()));
            }
        }

        return refactoringStatus;
    }
View Full Code Here

        if (remoteDeleteCanceled) {
            return refactoringStatus;
        }

        if (refactorController.getRefactorModel().isChangeResourcesEmpty()) {
            refactoringStatus.addEntry(refactorController.createFatalRefactoringStatusEntry(Constants.PLUGIN_NAME
                    + " does not support deleting resource"));
            return refactoringStatus;
        }

        // we delete on server BEFORE we delete locally
View Full Code Here

                    + e.getMessage() + ".  " + Messages.ResourceDeleteParticipant_exception_message));
        }

        if (Utils.isNotEmpty(entries)) {
            for (RefactoringStatusEntry refactoringStatusEntry : entries) {
                refactoringStatus.addEntry(refactoringStatusEntry);
            }
        }

        return refactoringStatus;
    }
View Full Code Here

        RefactoringStatus refactoringStatus = new RefactoringStatus();
        ProjectPackageList projectPackageList = refactorModel.getProjectPackageList();
        if (projectPackageList == null) {
            logger.error("Project package list not prepared for delete candidates");
            refactoringStatus.addEntry(createFatalRefactoringStatusEntry(Constants.PLUGIN_NAME
                    + " does not support deleting resource(s)"));
            return refactoringStatus;
        }

        Set<IResource> deleteCandidates = refactorModel.getChangeResources();
View Full Code Here

            return refactoringStatus;
        }

        Set<IResource> deleteCandidates = refactorModel.getChangeResources();
        if (Utils.isEmpty(deleteCandidates)) {
            refactoringStatus.addEntry(createInfoRefactoringStatusEntry("No resource(s) found to delete"));
            return refactoringStatus;
        }

        // for now, we assume there is only one delete candidate
        for (IResource deleteCandidate : deleteCandidates) {
View Full Code Here

        for (IResource deleteCandidate : deleteCandidates) {
            monitorCheck(monitor);
            if (Constants.PACKAGE_MANIFEST_FILE_NAME.equals(deleteCandidate.getName())) {
                logger.error(Constants.PLUGIN_NAME + " does not support deleting resource '"
                        + deleteCandidate.getFullPath().toPortableString());
                refactoringStatus.addEntry(createFatalRefactoringStatusEntry(Constants.PLUGIN_NAME
                        + " does not support deleting resource '" + deleteCandidate.getFullPath().toPortableString()));
                continue;
            }

            monitorCheck(monitor);
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.