Package de.fu_berlin.inf.dpp.activities

Examples of de.fu_berlin.inf.dpp.activities.SPath


        return true;
    }

    protected void add(IResource resource) {
        sharedProject.add(resource);
        final SPath spath = new SPath(resource);

        if (resource instanceof IFile) {
            try {
                addActivity(FileActivity.created(user, spath, Purpose.ACTIVITY));
            } catch (IOException e) {
View Full Code Here


    }

    protected void move(IResource resource, IPath oldFullPath,
        IProject oldProject, boolean contentChange) throws IOException {
        sharedProject.move(resource, oldFullPath);
        addActivity(FileActivity.moved(user, new SPath(resource), new SPath(
            oldProject, oldFullPath.removeFirstSegments(1)), contentChange));
    }
View Full Code Here

    }

    protected void remove(IResource resource) {
        sharedProject.remove(resource);
        if (resource instanceof IFile) {
            addActivity(FileActivity.removed(user, new SPath(resource),
                Purpose.ACTIVITY));
        } else {
            addActivity(new FolderActivity(user, FolderActivity.Type.Removed,
                new SPath(resource)));
        }
    }
View Full Code Here

     * events for files that are also handled by the editor manager.
     *
     * @param resource
     */
    private void contentChanged(IResource resource) {
        SPath spath = new SPath(resource);
        if (editorManager.isOpened(spath)) {
            return;
        }

        SharedResourcesManager.log.debug("Resource " + resource.getName()
View Full Code Here

        if (this.sarosSession == null) {
            log.warn("Project has ended for FileActivity " + activity);
            return;
        }

        SPath path = activity.getPath();
        IFile file = path.getFile();

        if (activity.isRecovery()) {
            log.info("Received consistency file: " + activity);

            if (log.isInfoEnabled() && (activity.getContents() != null)) {
View Full Code Here

        }
    }

    protected void exec(FolderActivity activity) throws CoreException {

        SPath path = activity.getPath();

        IFolder folder = path.getProject().getFolder(
            path.getProjectRelativePath());

        if (activity.getType() == FolderActivity.Type.Created) {
            FileUtils.create(folder);
        } else if (activity.getType() == FolderActivity.Type.Removed) {
            try {
View Full Code Here

    }

    protected void exec(VCSActivity activity) {
        final VCSActivity.Type activityType = activity.getType();
        SPath path = activity.getPath();
        final IResource resource = path.getResource();
        final IProject project = path.getProject();
        final String url = activity.getURL();
        final String directory = activity.getDirectory();
        final String revision = activity.getParam1();

        // Connect is special since the project doesn't have a VCSAdapter
View Full Code Here

            IPath iPath = file.getProjectRelativePath();
            if (iPath == null)
                return false;

            SPath path = new SPath(file.getProject(), iPath);

            if (containsUserToDisplay(editorManager
                .getRemoteActiveEditorUsers(path))) {
                log.trace("Active Deco: " + element);
                decoration.addOverlay(activeDescriptor, IDecoration.TOP_RIGHT);
View Full Code Here

     *
     * The method is robust against adding the same IEditorPart twice.
     */
    public void add(IEditorPart editorPart) {

        SPath path = editorManager.editorAPI.getEditorPath(editorPart);

        if (path == null) {
            log.warn("Could not find path/resource for editor "
                + editorPart.getTitle());
            return;
        }

        log.trace("EditorPool.add (" + path.toString() + ") invoked");

        if (getEditors(path).contains(editorPart)) {
            log.error("EditorPart was added twice to the EditorPool: "
                + editorPart.getTitle(), new StackTrace());
            return;
View Full Code Here

        IPath path = file.getProjectRelativePath();
        if (path == null) {
            log.warn("Could not find path for editor " + editorPart.getTitle());
        }
        return new SPath(file);
    }
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.activities.SPath

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.