org.netbeans.modules.groovy.grails.api.GrailsPlatform.isConfigured()

Here are the examples of the java api org.netbeans.modules.groovy.grails.api.GrailsPlatform.isConfigured() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

10 Source : BuildConfig.java
with Apache License 2.0
from apache

private File getGlobalPluginsDir11() {
    replacedert Thread.holdsLock(this);
    try {
        if (buildSettingsInstance != null) {
            Method getGlobalPluginsDirMethod = // NOI18N
            buildSettingsInstance.getClreplaced().getMethod(// NOI18N
            "getGlobalPluginsDir", new Clreplaced[] {});
            Object value = getGlobalPluginsDirMethod.invoke(buildSettingsInstance, new Object[] {});
            if (value instanceof File) {
                File file = (File) value;
                if (!file.isAbsolute()) {
                    file = new File(projectRoot, file.getPath());
                }
                return FileUtil.normalizeFile(file);
            }
        }
    } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
        LOGGER.log(Level.FINE, null, ex);
    }
    GrailsProjectConfig config = GrailsProjectConfig.forProject(project);
    GrailsPlatform platform = config.getGrailsPlatform();
    if (platform.isConfigured()) {
        return FileUtil.normalizeFile(new File(System.getProperty("user.home"), // NOI18N
        ".grails" + File.separator + config.getGrailsPlatform().getVersion().toString() + File.separator + // NOI18N
        "global-plugins"));
    }
    return null;
}

10 Source : BuildConfig.java
with Apache License 2.0
from apache

private File getProjectPluginsDir11() {
    replacedert Thread.holdsLock(this);
    try {
        if (buildSettingsInstance != null) {
            Method getProjectPluginsDirMethod = // NOI18N
            buildSettingsInstance.getClreplaced().getMethod(// NOI18N
            "getProjectPluginsDir", new Clreplaced[] {});
            Object value = getProjectPluginsDirMethod.invoke(buildSettingsInstance, new Object[] {});
            if (value instanceof File) {
                File file = (File) value;
                if (!file.isAbsolute()) {
                    file = new File(projectRoot, file.getPath());
                }
                return FileUtil.normalizeFile(file);
            }
        }
    } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
        LOGGER.log(Level.FINE, null, ex);
    }
    GrailsProjectConfig config = GrailsProjectConfig.forProject(project);
    GrailsPlatform platform = config.getGrailsPlatform();
    if (platform.isConfigured()) {
        return FileUtil.normalizeFile(new File(System.getProperty("user.home"), // NOI18N
        ".grails" + File.separator + config.getGrailsPlatform().getVersion().toString() + File.separator + "projects" + File.separator + projectRoot.getName() + File.separator + // NOI18N
        "plugins"));
    }
    return null;
}