Package de.fu_berlin.inf.dpp.activities.business

Examples of de.fu_berlin.inf.dpp.activities.business.VCSActivity


        result.addAll(otherActivities);

        // Note: This iteration relies on result starting with
        // vcsActivities.
        for (int i = 0; i < vcsActivities.size(); i++) {
            VCSActivity vcsActivity = (VCSActivity) (vcsActivities.get(i));
            if (!result.contains(vcsActivity))
                continue;
            // Iterate in reverse order so that we can safely remove items.
            for (int j = result.size() - 1; j > i; j--) {
                IResourceActivity otherActivity = result.get(j);
                if (result.contains(otherActivity)
                    && vcsActivity.includes(otherActivity)) {
                    if (!(otherActivity instanceof VCSActivity)) {
                        vcsActivity.containedActivity.add(0, otherActivity);
                    }
                    SharedResourcesManager.log
                        .debug("Ignoring redundant activity " + otherActivity);
View Full Code Here


        if (sharedProject.updateVcs(vcs)) {
            if (vcs == null) {
                // Disconnect
                boolean deleteContent = oldVcs == null
                    || !oldVcs.hasLocalCache(project);
                VCSActivity activity = VCSActivity.disconnect(sarosSession,
                    project, deleteContent);
                pendingActivities.enter(activity);
                sharedProject.updateRevision(null);
                sharedProject.updateVcsUrl(null);
            } else {
                // Connect
                VCSResourceInfo info = vcs.getResourceInfo(project);
                String repositoryString = vcs.getRepositoryString(project);
                if (repositoryString == null || info.url == null) {
                    // HACK For some reason, Subclipse returns null values
                    // here. Pretend the vcs is still null and wait for the
                    // next time we get here.
                    sharedProject.updateVcs(null);
                    return false;
                }

                String directory = info.url
                    .substring(repositoryString.length());
                VCSActivity activity = VCSActivity.connect(sarosSession,
                    project, repositoryString, directory,
                    vcs.getProviderID(project));
                pendingActivities.enter(activity);
                sharedProject.updateVcsUrl(info.url);
                sharedProject.updateRevision(info.revision);
View Full Code Here

    }

    public IActivity getActivity(ISarosSession sarosSession) {
        SPath sPath = path == null ? null : path.toSPath(sarosSession);
        User user = sarosSession == null ? null : sarosSession.getUser(source);
        final VCSActivity vcsActivity = new VCSActivity(type, user, sPath, url,
            directory, param1);
        vcsActivity.containedActivity.ensureCapacity(containedActivity.size());
        for (IResourceActivityDataObject ado : containedActivity) {
            vcsActivity.containedActivity.add((IResourceActivity) ado
                .getActivity(sarosSession));
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.activities.business.VCSActivity

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.