Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IResource.move()


        final IMarker marker = getMarker();
        final List<String> margs = getQuickFix().getArgs();
        final IResource file = marker.getResource();
        final IPath path = file.getFullPath();
        final IPath newPath = path.removeLastSegments(1).append(margs.get(0) + ".erl");
        file.move(newPath, true, null);
    }

    @Override
    public void handleException(final Throwable exception) {
        if (exception instanceof CoreException) {
View Full Code Here


            // better to have the non-deletable files in one place,
            // instead of messing the build directory
            IPath trashFolder = res.getProject().getFullPath().append("build/.trash");
            IPath trashPath = trashFolder.append(res.getName() + (_getUniqifier()));
            checkDir(trashFolder, m);
            res.move(trashPath, true, null);
            /*
             * IPath newName = res.getLocation().removeLastSegments(1);
             * newName = newName.append(res.getName()+_getUniqifier());
             * File resFile = res.getLocation().toFile(); if
             * (!resFile.renameTo(newName.toFile())) { throw ce; }
View Full Code Here

            pm.beginTask(getName(), 1);

            IResource resource = getResource();
            long currentStamp = resource.getModificationStamp();
            IPath newPath = renamedResourcePath(fResourcePath, fNewName);
            resource.move(newPath, IResource.SHALLOW, pm);
            if (fStampToRestore != IResource.NULL_STAMP) {
                IResource newResource = ResourcesPlugin.getWorkspace().getRoot().findMember(newPath);
                newResource.revertModificationStamp(fStampToRestore);
            }
            String oldName = fResourcePath.lastSegment();
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.