This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 206199
Collapse All | Expand All

(-)groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/ProjectClassPathImplementation.java (-3 / +12 lines)
Lines 126-135 Link Here
126
126
127
    private List<PathResourceImplementation> getPath() {
127
    private List<PathResourceImplementation> getPath() {
128
        assert Thread.holdsLock(this);
128
        assert Thread.holdsLock(this);
129
        BuildConfig buildConfig = ((GrailsProject) projectConfig.getProject()).getBuildConfig();
130
        buildConfig.reload();
129
131
130
        List<PathResourceImplementation> result = new ArrayList<PathResourceImplementation>();
132
        List<PathResourceImplementation> result = new ArrayList<PathResourceImplementation>();
131
        // lib directory from project root
133
        // lib directory from project root
132
        addLibs(projectRoot, result);
134
        addLibs(projectRoot, result);
135
        List<File> compileDeps = buildConfig.getCompileDependencies();
136
        addJars(compileDeps.toArray(new File[compileDeps.size()]),result,false);
133
137
134
        // FIXME move this to plugin specific support
138
        // FIXME move this to plugin specific support
135
        // http://grails.org/GWT+Plugin
139
        // http://grails.org/GWT+Plugin
Lines 162-168 Link Here
162
        }
166
        }
163
167
164
        // in-place plugins
168
        // in-place plugins
165
        List<GrailsPlugin> localPlugins = ((GrailsProject) projectConfig.getProject()).getBuildConfig().getLocalPlugins();
169
        List<GrailsPlugin> localPlugins = buildConfig.getLocalPlugins();
166
        for (GrailsPlugin plugin : localPlugins) {
170
        for (GrailsPlugin plugin : localPlugins) {
167
            if (plugin.getPath() != null) {
171
            if (plugin.getPath() != null) {
168
                addLibs(plugin.getPath(), result);
172
                addLibs(plugin.getPath(), result);
Lines 172-178 Link Here
172
176
173
        // project plugins
177
        // project plugins
174
        File oldPluginsDir = pluginsDir;
178
        File oldPluginsDir = pluginsDir;
175
        File currentPluginsDir = ((GrailsProject) projectConfig.getProject()).getBuildConfig().getProjectPluginsDir();
179
        File currentPluginsDir = buildConfig.getProjectPluginsDir();
176
180
177
        if (pluginsDir == null || !pluginsDir.equals(currentPluginsDir)) {
181
        if (pluginsDir == null || !pluginsDir.equals(currentPluginsDir)) {
178
            LOGGER.log(Level.FINE, "Project plugins dir changed from {0} to {1}",
182
            LOGGER.log(Level.FINE, "Project plugins dir changed from {0} to {1}",
Lines 187-193 Link Here
187
        // global plugins
191
        // global plugins
188
        // TODO philosophical question: Is the global plugin boot or compile classpath?
192
        // TODO philosophical question: Is the global plugin boot or compile classpath?
189
        File oldGlobalPluginsDir = globalPluginsDir;
193
        File oldGlobalPluginsDir = globalPluginsDir;
190
        File currentGlobalPluginsDir = ((GrailsProject) projectConfig.getProject()).getBuildConfig().getGlobalPluginsDir();
194
        File currentGlobalPluginsDir = buildConfig.getGlobalPluginsDir();
191
        if (globalPluginsDir == null || !globalPluginsDir.equals(currentGlobalPluginsDir)) {
195
        if (globalPluginsDir == null || !globalPluginsDir.equals(currentGlobalPluginsDir)) {
192
            LOGGER.log(Level.FINE, "Project plugins dir changed from {0} to {1}",
196
            LOGGER.log(Level.FINE, "Project plugins dir changed from {0} to {1}",
193
                    new Object[] {pluginsDir, currentPluginsDir});
197
                    new Object[] {pluginsDir, currentPluginsDir});
Lines 211-216 Link Here
211
        // global plugins listener
215
        // global plugins listener
212
        updateListener(listenerPluginsLib, oldGlobalPluginsDir, currentGlobalPluginsDir);
216
        updateListener(listenerPluginsLib, oldGlobalPluginsDir, currentGlobalPluginsDir);
213
217
218
        
214
        return Collections.unmodifiableList(result);
219
        return Collections.unmodifiableList(result);
215
    }
220
    }
216
221
Lines 250-255 Link Here
250
255
251
    private static void addJars(File dir, List<PathResourceImplementation> result, boolean recurse) {
256
    private static void addJars(File dir, List<PathResourceImplementation> result, boolean recurse) {
252
        File[] jars = dir.listFiles();
257
        File[] jars = dir.listFiles();
258
        addJars(jars,result,recurse);
259
    }
260
    
261
    private static void addJars(File[] jars, List<PathResourceImplementation> result, boolean recurse) {                
253
        if (jars != null) {
262
        if (jars != null) {
254
            for (File f : jars) {
263
            for (File f : jars) {
255
                try {
264
                try {

Return to bug 206199