Package com.intellij.openapi.vcs.changes

Examples of com.intellij.openapi.vcs.changes.Change


    }

    private void addedFiles() throws VcsException {
        Sets.SetView<String> addedFiles = Sets.difference(changes.keySet(), baseChanges.keySet());
        for (String addedFile : addedFiles) {
            Change change = changes.get(addedFile);
            ContentRevision beforeRevision = null;
            if (change.getType().equals(Change.Type.MODIFICATION)) {
                ContentRevision changeBeforeRevision = change.getBeforeRevision();
                assert changeBeforeRevision != null;
                beforeRevision = new SimpleContentRevision(
                        changeBeforeRevision.getContent(),
                        changeBeforeRevision.getFile(),
                        baseHash);
            }
            diff.add(new Change(beforeRevision, change.getAfterRevision()));
        }
    }
View Full Code Here


    }

    private void changedFiles() {
        Sets.SetView<String> changedFiles = Sets.intersection(baseChanges.keySet(), changes.keySet());
        for (String changedFile : changedFiles) {
            Change baseChange = baseChanges.get(changedFile);
            ContentRevision baseRevision = baseChange.getAfterRevision();
            Change change = changes.get(changedFile);
            ContentRevision revision = change.getAfterRevision();
            if (baseRevision != null || revision != null) {
                diff.add(new Change(baseRevision, revision));
            }
        }
    }
View Full Code Here

    }

    private void removedFiles() throws VcsException {
        Sets.SetView<String> removedFiles = Sets.difference(baseChanges.keySet(), changes.keySet());
        for (String removedFile : removedFiles) {
            Change baseChange = baseChanges.get(removedFile);
            ContentRevision afterRevision = null;
            if (baseChange.getType().equals(Change.Type.MODIFICATION)) {
                ContentRevision baseChangeBeforeRevision = baseChange.getBeforeRevision();
                assert baseChangeBeforeRevision != null;
                afterRevision = new SimpleContentRevision(
                        baseChangeBeforeRevision.getContent(),
                        baseChangeBeforeRevision.getFile(),
                        hash
                );
            }
            diff.add(new Change(baseChange.getAfterRevision(), afterRevision));
        }
    }
View Full Code Here

            public FileType getFileType() {
                return PlainTextFileType.INSTANCE;
            }
        };

        changes.add(new Change(null, new SimpleContentRevision(
                content,
                commitMsg,
                gitCommit.getHash().getValue()
        )));
        return changes;
View Full Code Here

TOP

Related Classes of com.intellij.openapi.vcs.changes.Change

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.