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 234602
Collapse All | Expand All

(-)a/ide.ergonomics/build.xml (+6 lines)
Lines 41-46 Link Here
41
    </target>
41
    </target>
42
42
43
    <target name="-init-clusters">
43
    <target name="-init-clusters">
44
        <autoupdate todir="${netbeans.dest.dir}/download/" 
45
            updatecenter="http://plugins.netbeans.org/nbpluginportal/files/nbms/pluginportal-update-center.xml"
46
        >
47
            <modules includes=".*scala.*"/>
48
        </autoupdate>
44
        <property name="common.ergonomics" location="src-ant/org/netbeans/modules/ide/ergonomics/ant/common-ergonomics.xml"/>
49
        <property name="common.ergonomics" location="src-ant/org/netbeans/modules/ide/ergonomics/ant/common-ergonomics.xml"/>
45
        <resolvelist
50
        <resolvelist
46
            name="ergonomic.clusters.includes"
51
            name="ergonomic.clusters.includes"
Lines 58-63 Link Here
58
            <exclude name="platform"/>
63
            <exclude name="platform"/>
59
            <exclude name="ergonomics"/>
64
            <exclude name="ergonomics"/>
60
            <exclude name="extra"/>
65
            <exclude name="extra"/>
66
            <include name="download"/>
61
            <exclude name="nb"/>
67
            <exclude name="nb"/>
62
        </dirset>
68
        </dirset>
63
    </target>
69
    </target>
(-)a/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureInfo.java (+4 lines)
Lines 236-241 Link Here
236
        if (p != null) {
236
        if (p != null) {
237
            return p;
237
            return p;
238
        }
238
        }
239
        
240
        if (this.clusterName.equals("download")) {
241
            return cachePresent = true;
242
        }
239
243
240
        Set<String> codeNames = new HashSet<String>(getCodeNames());
244
        Set<String> codeNames = new HashSet<String>(getCodeNames());
241
        for (ModuleInfo moduleInfo : Lookup.getDefault().lookupAll(ModuleInfo.class)) {
245
        for (ModuleInfo moduleInfo : Lookup.getDefault().lookupAll(ModuleInfo.class)) {
(-)a/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureManager.java (-14 / +19 lines)
Lines 237-262 Link Here
237
            for (String c : paths) {
237
            for (String c : paths) {
238
                int last = c.lastIndexOf(File.separatorChar);
238
                int last = c.lastIndexOf(File.separatorChar);
239
                String clusterName = c.substring(last + 1).replaceFirst("[0-9\\.]*$", "");
239
                String clusterName = c.substring(last + 1).replaceFirst("[0-9\\.]*$", "");
240
                String basename = "/org/netbeans/modules/ide/ergonomics/" + clusterName;
240
                registerCluster(clusterName, ic);
241
                String layerName = basename + "/layer.xml";
242
                String bundleName = basename + "/Bundle.properties";
243
                URL layer = FeatureManager.class.getResource(layerName);
244
                URL bundle = FeatureManager.class.getResource(bundleName);
245
                if (layer != null && bundle != null) {
246
                    FeatureInfo info;
247
                    try {
248
                        info = FeatureInfo.create(clusterName, layer, bundle);
249
                        ic.add(info);
250
                    } catch (IOException ex) {
251
                        Exceptions.printStackTrace(ex);
252
                    }
253
                }
254
            }
241
            }
242
            registerCluster("download", ic);
255
            featureTypesLookup = l;
243
            featureTypesLookup = l;
256
        }
244
        }
257
        return featureTypesLookup;
245
        return featureTypesLookup;
258
    }
246
    }
259
247
248
    private static void registerCluster(String clusterName, InstanceContent ic) {
249
        String basename = "/org/netbeans/modules/ide/ergonomics/" + clusterName;
250
        String layerName = basename + "/layer.xml";
251
        String bundleName = basename + "/Bundle.properties";
252
        URL layer = FeatureManager.class.getResource(layerName);
253
        URL bundle = FeatureManager.class.getResource(bundleName);
254
        if (layer != null && bundle != null) {
255
            FeatureInfo info;
256
            try {
257
                info = FeatureInfo.create(clusterName, layer, bundle);
258
                ic.add(info);
259
            } catch (IOException ex) {
260
                Exceptions.printStackTrace(ex);
261
            }
262
        }
263
    }
264
260
    public void addChangeListener(ChangeListener l) {
265
    public void addChangeListener(ChangeListener l) {
261
        support.addChangeListener(l);
266
        support.addChangeListener(l);
262
    }
267
    }

Return to bug 234602