Package org.netbeans.gradle.project.java.query

Examples of org.netbeans.gradle.project.java.query.GradleClassPathProvider$EventSource


    @After
    public void tearDown() throws Exception {
    }

    private static boolean isJavaExtensionActive(Project project) {
        GradleClassPathProvider javaCpProvider = project.getLookup().lookup(GradleClassPathProvider.class);
        return javaCpProvider != null;
    }
View Full Code Here


        assertTrue("Must have retrieved the eclipse project model.", model instanceof EclipseProject);
    }

    @Test
    public void testDisabledJavaExtension() throws Exception {
        GradleClassPathProvider cpProvider = rootProject.getLookup().lookup(GradleClassPathProvider.class);
        assertNull("JavaExtension must be disabled and its lookup must not be visible.", cpProvider);
    }
View Full Code Here

            throw new IOException("Project directory does not exist: " + project.getProjectDirectory());
        }

        this.project = project;
        this.currentModel = IdeaJavaModelUtils.createEmptyModel(project.getProjectDirectory());
        this.cpProvider = new GradleClassPathProvider(this);
        this.projectLookupRef = new AtomicReference<>(null);
        this.permanentLookupRef = new AtomicReference<>(null);
        this.extensionLookupRef = new AtomicReference<>(null);
        this.combinedLookupRef = new AtomicReference<>(null);
        this.hasEverBeenLoaded = false;
View Full Code Here

        this.project = project;
        this.classPath = getClassPathFromProject(project);
    }

    private static ClassPath getClassPathFromProject(Project project) {
        GradleClassPathProvider classPaths = project.getLookup().lookup(GradleClassPathProvider.class);
        if (classPaths == null) {
            LOGGER.log(Level.WARNING, "No class path provider for project: {0}", project.getProjectDirectory());
            return ClassPath.EMPTY;
        }

        ClassPath classPath = classPaths.getAllRuntimeClassPaths();
        if (classPath == null) {
            LOGGER.log(Level.WARNING, "No runtime class path for project: {0}", project.getProjectDirectory());
            return ClassPath.EMPTY;
        }
        return classPath;
View Full Code Here

        Map<String, byte[]> map = new HashMap<>();
        EditorContext editorContext = DebuggerManager.
                getDebuggerManager().lookupFirst(null, EditorContext.class);

        String clazz = classname.replace('.', '/') + ".class"; //NOI18N
        GradleClassPathProvider prv = project.getLookup().lookup(GradleClassPathProvider.class);
        FileObject fo2 = prv.getBuildOutputClassPaths().findResource(clazz);

        if (fo2 != null) {
            try {
                String basename = fo2.getName();
                for (FileObject classfile : fo2.getParent().getChildren()) {
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.project.java.query.GradleClassPathProvider$EventSource

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.