Here are the examples of the java api org.netbeans.modules.groovy.grails.api.GrailsProjectConfig.setLocalPlugins() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : BuildConfig.java
with Apache License 2.0
from apache
with Apache License 2.0
from apache
public void reload() {
long start = System.currentTimeMillis();
File currentProjectPluginsDir;
File currentGlobalPluginsDir;
List<GrailsPlugin> currentLocalPlugins;
synchronized (this) {
File newProjectRoot = FileUtil.toFile(project.getProjectDirectory());
replacedert newProjectRoot != null;
if (!newProjectRoot.equals(projectRoot)) {
projectRoot = newProjectRoot;
}
buildSettingsInstance = loadBuildSettings();
LOGGER.log(Level.FINE, "Took {0} ms to load BuildSettings for {1}", new Object[] { (System.currentTimeMillis() - start), project.getProjectDirectory().getNameExt() });
currentLocalPlugins = loadLocalPlugins();
currentProjectPluginsDir = loadProjectPluginsDir();
currentGlobalPluginsDir = loadGlobalPluginsDir();
}
if (GrailsPlatform.Version.VERSION_1_1.compareTo(GrailsProjectConfig.forProject(project).getGrailsPlatform().getVersion()) <= 0) {
GrailsProjectConfig config = project.getLookup().lookup(GrailsProjectConfig.clreplaced);
if (config != null) {
ProjectConfigListener listener = new ProjectConfigListener();
config.addPropertyChangeListener(listener);
try {
config.setProjectPluginsDir(FileUtil.normalizeFile(currentProjectPluginsDir));
config.setGlobalPluginsDir(FileUtil.normalizeFile(currentGlobalPluginsDir));
Map<String, File> prepared = new HashMap<>();
for (GrailsPlugin plugin : currentLocalPlugins) {
prepared.put(plugin.getName(), plugin.getPath());
}
config.setLocalPlugins(prepared);
} finally {
config.removePropertyChangeListener(listener);
}
if (listener.isChanged()) {
propertySupport.firePropertyChange(BUILD_CONFIG_PLUGINS, null, null);
}
}
}
}