Examples of FileTree


Examples of nz.govt.natlib.meta.ui.tree.FileTree

  private void jbInit() throws Exception {
    folderButton = new ImageButton(new ImageIcon(ImagePanel
        .resolveImage("xp_folder_small.gif")));
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    fileTree = new FileTree(fileList);
    // titledBorder4 = new
    // TitledBorder(BorderFactory.createEtchedBorder(Color.white,new
    // Color(148, 145, 140)),"Processing Results");
    setIconImage(ImagePanel.resolveImage("icon.gif"));
    newObjectIcon = new ImageIcon(ImagePanel
View Full Code Here

Examples of org.gradle.api.file.FileTree

     * @return The source.
     */
    @InputFiles
    @SkipWhenEmpty
    public FileTree getSource() {
        FileTree src = this.source.isEmpty() ? getDefaultSource() : getProject().files(new ArrayList<Object>(this.source)).getAsFileTree();
        return src == null ? getProject().files().getAsFileTree() : src.matching(patternSet);
    }
View Full Code Here

Examples of org.gradle.api.file.FileTree

        return compiler.getCompileOptions();
    }

    @Override
    protected void compile() {
        FileTree source = getSource();
        compiler.setSource(source);
        compiler.setDestinationDir(getDestinationDir());
        compiler.setClasspath(getClasspath());
        compiler.setScalaClasspath(getScalaClasspath());
        compiler.setSourceCompatibility(getSourceCompatibility());
View Full Code Here

Examples of org.gradle.api.file.FileTree

        assertThat(collection.getAsFileTrees(), equalTo((Collection) toList(set1, set2)));
    }
   
    @Test
    public void getAsFileTreeDelegatesToEachSet() {
        final FileTree tree1 = context.mock(FileTree.class, "tree1");
        final FileTree tree2 = context.mock(FileTree.class, "tree2");

        context.checking(new Expectations() {{
            one(source1).getAsFileTree();
            will(returnValue(tree1));
            one(source2).getAsFileTree();
            will(returnValue(tree2));
        }});

        FileTree fileTree = collection.getAsFileTree();
        assertThat(fileTree, instanceOf(CompositeFileTree.class));
        assertThat(((CompositeFileTree) fileTree).getSourceCollections(), equalTo((Iterable) toList(tree1, tree2)));
    }
View Full Code Here

Examples of org.gradle.api.file.FileTree

        assertThat(((CompositeFileTree) fileTree).getSourceCollections(), equalTo((Iterable) toList(tree1, tree2)));
    }

    @Test
    public void fileTreeIsLive() {
        final FileTree tree1 = context.mock(FileTree.class, "tree1");
        final FileTree tree2 = context.mock(FileTree.class, "tree2");
        final FileCollection source3 = context.mock(FileCollection.class);
        final FileTree tree3 = context.mock(FileTree.class);

        context.checking(new Expectations() {{
            one(source1).getAsFileTree();
            will(returnValue(tree1));
            one(source2).getAsFileTree();
            will(returnValue(tree2));
        }});

        FileTree fileTree = collection.getAsFileTree();
        assertThat(fileTree, instanceOf(CompositeFileTree.class));
        assertThat(((CompositeFileTree) fileTree).getSourceCollections(), equalTo((Iterable) toList(tree1, tree2)));

        collection.sourceCollections.add(source3);
View Full Code Here

Examples of org.gradle.api.file.FileTree

    private final JUnit4Mockery context = new JUnit4Mockery();
    private final UnionFileTree set = new UnionFileTree("<display name>");

    @Test
    public void canAddFileTree() {
        FileTree set1 = context.mock(FileTree.class, "set1");

        set.add(set1);
        assertThat(set.getSourceCollections(), equalTo((Iterable) toList((Object) set1)));
    }
View Full Code Here

Examples of org.gradle.api.file.FileTree

    };

    @Test
    public void matchingWithClosureReturnsUnionOfFilteredSets() {
        final Closure closure = HelperUtil.TEST_CLOSURE;
        final FileTree filtered1 = context.mock(FileTree.class, "filtered1");
        final FileTree filtered2 = context.mock(FileTree.class, "filtered2");

        context.checking(new Expectations() {{
            one(source1).matching(closure);
            will(returnValue(filtered1));
            one(source2).matching(closure);
            will(returnValue(filtered2));
        }});

        FileTree filtered = tree.matching(closure);
        assertThat(filtered, instanceOf(CompositeFileTree.class));
        CompositeFileTree filteredCompositeSet = (CompositeFileTree) filtered;

        assertThat(toList(filteredCompositeSet.getSourceCollections()), equalTo(toList(filtered1, filtered2)));
    }
View Full Code Here

Examples of org.gradle.api.file.FileTree

    }

    @Test
    public void matchingWithPatternSetReturnsUnionOfFilteredSets() {
        final PatternSet patternSet = new PatternSet();
        final FileTree filtered1 = context.mock(FileTree.class, "filtered1");
        final FileTree filtered2 = context.mock(FileTree.class, "filtered2");

        context.checking(new Expectations() {{
            one(source1).matching(patternSet);
            will(returnValue(filtered1));
            one(source2).matching(patternSet);
            will(returnValue(filtered2));
        }});

        FileTree filtered = tree.matching(patternSet);
        assertThat(filtered, instanceOf(CompositeFileTree.class));
        CompositeFileTree filteredCompositeSet = (CompositeFileTree) filtered;

        assertThat(toList(filteredCompositeSet.getSourceCollections()), equalTo(toList(filtered1, filtered2)));
    }
View Full Code Here

Examples of org.gradle.api.file.FileTree

        assertThat(toList(filteredCompositeSet.getSourceCollections()), equalTo(toList(filtered1, filtered2)));
    }

    @Test
    public void plusReturnsUnionOfThisTreeAndSourceTree() {
        FileTree other = context.mock(FileTree.class, "other");

        FileTree sum = tree.plus(other);
        assertThat(sum, instanceOf(CompositeFileTree.class));
        UnionFileTree sumCompositeTree = (UnionFileTree) sum;
        assertThat(sumCompositeTree.getSourceCollections(), equalTo((Iterable) toList(tree, other)));
    }
View Full Code Here

Examples of org.gradle.api.file.FileTree

    public WorkResult execute() {
        scalaCompiler.execute();

        PatternFilterable patternSet = new PatternSet();
        patternSet.include("**/*.java");
        FileTree javaSource = source.getAsFileTree().matching(patternSet);
        if (!javaSource.isEmpty()) {
            javaCompiler.setSource(javaSource);
            javaCompiler.execute();
        }

        return new WorkResult() {
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.