Search in sources :

Example 1 with FileModelFactory

use of org.eclipse.egit.ui.internal.synchronize.model.TreeBuilder.FileModelFactory in project egit by eclipse.

the class GitModelCommit method createChildren.

private GitModelObject[] createChildren() {
    FileModelFactory fileModelFactory = new FileModelFactory() {

        @Override
        public GitModelBlob createFileModel(GitModelObjectContainer parent, Repository repository, Change change, IPath fullPath) {
            return new GitModelBlob(parent, repository, change, fullPath);
        }

        @Override
        public boolean isWorkingTree() {
            return false;
        }
    };
    TreeModelFactory treeModelFactory = new TreeModelFactory() {

        @Override
        public GitModelTree createTreeModel(GitModelObjectContainer parent, IPath fullPath, int kind) {
            return new GitModelTree(parent, fullPath, kind);
        }
    };
    return TreeBuilder.build(this, repo, commit.getChildren(), fileModelFactory, treeModelFactory);
}
Also used : TreeModelFactory(org.eclipse.egit.ui.internal.synchronize.model.TreeBuilder.TreeModelFactory) Repository(org.eclipse.jgit.lib.Repository) FileModelFactory(org.eclipse.egit.ui.internal.synchronize.model.TreeBuilder.FileModelFactory) IPath(org.eclipse.core.runtime.IPath) Change(org.eclipse.egit.core.synchronize.GitCommitsModelCache.Change)

Aggregations

IPath (org.eclipse.core.runtime.IPath)1 Change (org.eclipse.egit.core.synchronize.GitCommitsModelCache.Change)1 FileModelFactory (org.eclipse.egit.ui.internal.synchronize.model.TreeBuilder.FileModelFactory)1 TreeModelFactory (org.eclipse.egit.ui.internal.synchronize.model.TreeBuilder.TreeModelFactory)1 Repository (org.eclipse.jgit.lib.Repository)1