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

(-)a/settings/apichanges.xml (+14 lines)
Lines 108-113 Link Here
108
108
109
<!-- ACTUAL CHANGES BEGIN HERE: -->
109
<!-- ACTUAL CHANGES BEGIN HERE: -->
110
  <changes>
110
  <changes>
111
    <change id="method.factory">
112
        <api name="settings_api"/>
113
        <summary>Instances may have factory methods</summary>
114
        <version major="1" minor="40"/>
115
        <date day="15" month="3" year="2013"/>
116
        <author login="jtulach"/>
117
        <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="yes" semantic="compatible" source="compatible"/>
118
        <description>
119
            No need for the instances to have default constructor anymore.
120
            One can tell the system to use different factory method.
121
        </description>
122
        <class package="org.netbeans.api.settings" name="FactoryMethod"/>
123
        <issue number="227050"/>
124
    </change>
111
    <change id="private.factories">
125
    <change id="private.factories">
112
        <api name="settings_spi"/>
126
        <api name="settings_spi"/>
113
        <summary>Factory methods can be private</summary>
127
        <summary>Factory methods can be private</summary>
(-)a/settings/manifest.mf (-1 / +1 lines)
Lines 3-7 Link Here
3
OpenIDE-Module-Layer: org/netbeans/modules/settings/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/settings/resources/mf-layer.xml
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/settings/resources/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/settings/resources/Bundle.properties
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
OpenIDE-Module-Specification-Version: 1.39
6
OpenIDE-Module-Specification-Version: 1.40
7
7
(-)a0cd15490d3a (+69 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2013 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.api.settings;
43
44
import java.lang.annotation.ElementType;
45
import java.lang.annotation.Retention;
46
import java.lang.annotation.RetentionPolicy;
47
import java.lang.annotation.Target;
48
import org.netbeans.spi.settings.Convertor;
49
50
/** Specifies an alternative factory method to use (rather than constructor)
51
 * to create the instance. Use in orchestration with 
52
 * {@link ConvertAsProperties} or on any class that is processed by serializing
53
 * {@link Convertor}s.
54
 * 
55
 * @since 1.40
56
 * @author Jaroslav Tulach <jtulach@netbeans.org>
57
 */
58
@Target(ElementType.TYPE)
59
@Retention(RetentionPolicy.RUNTIME)
60
public @interface FactoryMethod {
61
    /**
62
     * Name of factory method to use instead of default constructor. Sometimes, for
63
     * example when dealing with singletons, it may be desirable to control how
64
     * an instance of given class is created. In such case one can create a
65
     * factory method (takes no arguments and returns instance of desired type)
66
     * in the class annotated by {@link ConvertAsProperties} annotation.
67
     */
68
    String value();
69
}
(-)a/settings/src/org/netbeans/modules/settings/convertors/ConvertorProcessor.java (-1 / +43 lines)
Lines 53-58 Link Here
53
import javax.annotation.processing.SupportedSourceVersion;
53
import javax.annotation.processing.SupportedSourceVersion;
54
import javax.lang.model.SourceVersion;
54
import javax.lang.model.SourceVersion;
55
import javax.lang.model.element.Element;
55
import javax.lang.model.element.Element;
56
import javax.lang.model.element.ElementKind;
56
import javax.lang.model.element.ExecutableElement;
57
import javax.lang.model.element.ExecutableElement;
57
import javax.lang.model.element.Modifier;
58
import javax.lang.model.element.Modifier;
58
import javax.lang.model.element.TypeElement;
59
import javax.lang.model.element.TypeElement;
Lines 61-66 Link Here
61
import javax.lang.model.util.ElementFilter;
62
import javax.lang.model.util.ElementFilter;
62
import org.netbeans.api.settings.ConvertAsJavaBean;
63
import org.netbeans.api.settings.ConvertAsJavaBean;
63
import org.netbeans.api.settings.ConvertAsProperties;
64
import org.netbeans.api.settings.ConvertAsProperties;
65
import org.netbeans.api.settings.FactoryMethod;
64
import org.netbeans.modules.settings.Env;
66
import org.netbeans.modules.settings.Env;
65
import org.openide.filesystems.annotations.LayerBuilder.File;
67
import org.openide.filesystems.annotations.LayerBuilder.File;
66
import org.openide.filesystems.annotations.LayerGeneratingProcessor;
68
import org.openide.filesystems.annotations.LayerGeneratingProcessor;
Lines 78-84 Link Here
78
    public @Override Set<String> getSupportedAnnotationTypes() {
80
    public @Override Set<String> getSupportedAnnotationTypes() {
79
        return new HashSet<String>(Arrays.asList(
81
        return new HashSet<String>(Arrays.asList(
80
            ConvertAsProperties.class.getCanonicalName(),
82
            ConvertAsProperties.class.getCanonicalName(),
81
            ConvertAsJavaBean.class.getCanonicalName()
83
            ConvertAsJavaBean.class.getCanonicalName(),
84
            FactoryMethod.class.getCanonicalName()
82
        ));
85
        ));
83
    }
86
    }
84
87
Lines 158-163 Link Here
158
            }
161
            }
159
            f.write();
162
            f.write();
160
        }
163
        }
164
        
165
        for (Element e : env.getElementsAnnotatedWith(FactoryMethod.class)) {
166
            FactoryMethod m = e.getAnnotation(FactoryMethod.class);
167
            if (m == null) {
168
                continue;
169
            }
170
            
171
            boolean found = false;
172
            for (Element ch : e.getEnclosedElements()) {
173
                if (ch.getKind() != ElementKind.METHOD) {
174
                    continue;
175
                }
176
                
177
                if (!m.value().equals(ch.getSimpleName().toString())) {
178
                    continue;
179
                }
180
                
181
                ExecutableElement ee = (ExecutableElement)ch;
182
                
183
                if (ee.getParameters().size() > 0) {
184
                    throw new LayerGenerationException("Factory method " + m.value() + " must have no parameters", ee);
185
                }
186
187
                if (!ee.getModifiers().contains(Modifier.STATIC)) {
188
                    throw new LayerGenerationException("Factory method " + m.value() + " has to be static", ee);
189
                }
190
                
191
                if (!processingEnv.getTypeUtils().isSameType(ee.getReturnType(), e.asType())) {
192
                    throw new LayerGenerationException("Factory method " + m.value() + " must return " + e.getSimpleName(), ee);
193
                }
194
                
195
                found = true;
196
            }
197
            
198
            if (!found) {
199
                throw new LayerGenerationException("Method named " + m.value() + " was not found in this class", e);
200
            }
201
        }
202
        
161
        return true;
203
        return true;
162
    }
204
    }
163
205
(-)a/settings/src/org/netbeans/modules/settings/convertors/XMLPropertiesConvertor.java (-1 / +1 lines)
Lines 225-231 Link Here
225
        
225
        
226
        Class c = getInstanceClass();
226
        Class c = getInstanceClass();
227
        try {
227
        try {
228
            return c.newInstance();
228
            return XMLSettingsSupport.newInstance(c);
229
        } catch (Exception ex) { // IllegalAccessException, InstantiationException
229
        } catch (Exception ex) { // IllegalAccessException, InstantiationException
230
            IOException ioe = new IOException("Cannot create instance of " + c.getName()); // NOI18N
230
            IOException ioe = new IOException("Cannot create instance of " + c.getName()); // NOI18N
231
            ioe.initCause(ex);
231
            ioe.initCause(ex);
(-)a/settings/src/org/netbeans/modules/settings/convertors/XMLSettingsSupport.java (-3 / +23 lines)
Lines 46-55 Link Here
46
46
47
import java.io.*;
47
import java.io.*;
48
import java.lang.reflect.Constructor;
48
import java.lang.reflect.Constructor;
49
import java.lang.reflect.InvocationTargetException;
49
import java.lang.reflect.Method;
50
import java.lang.reflect.Method;
50
import java.util.*;
51
import java.util.*;
51
import java.util.logging.Level;
52
import java.util.logging.Level;
52
import java.util.logging.Logger;
53
import java.util.logging.Logger;
54
import org.netbeans.api.settings.FactoryMethod;
53
55
54
import org.openide.filesystems.*;
56
import org.openide.filesystems.*;
55
import org.openide.modules.ModuleInfo;
57
import org.openide.modules.ModuleInfo;
Lines 78-83 Link Here
78
    
80
    
79
    /** Logging for events in XML settings system. */
81
    /** Logging for events in XML settings system. */
80
    static final Logger err = Logger.getLogger(XMLSettingsSupport.class.getName()); // NOI18N
82
    static final Logger err = Logger.getLogger(XMLSettingsSupport.class.getName()); // NOI18N
83
84
    static Object newInstance(Class<?> clazz) throws IllegalArgumentException, 
85
    InstantiationException, NoSuchMethodException, InvocationTargetException, 
86
    IllegalAccessException {
87
        FactoryMethod fm = clazz.getAnnotation(FactoryMethod.class);
88
        if (fm != null) {
89
            Method method;
90
            try {
91
                method = clazz.getMethod(fm.value());
92
            } catch (NoSuchMethodException ex) {
93
                method = clazz.getDeclaredMethod(fm.value());
94
            }
95
            method.setAccessible(true);
96
            return method.invoke(null);
97
        }
98
        Constructor<?> c = clazz.getDeclaredConstructor();
99
        c.setAccessible(true);
100
        return c.newInstance();
101
    }
102
81
    
103
    
82
    /** Store instanceof elements.
104
    /** Store instanceof elements.
83
     * @param classes everything what class extends or implements
105
     * @param classes everything what class extends or implements
Lines 603-611 Link Here
603
                        }
625
                        }
604
                    } else {
626
                    } else {
605
                        try {
627
                        try {
606
                            Constructor<?> c = clazz.getDeclaredConstructor();
628
                            inst = newInstance(clazz);
607
                            c.setAccessible(true);
608
                            inst = c.newInstance();
609
                        } catch (Exception ex) {
629
                        } catch (Exception ex) {
610
                            IOException ioe = new IOException();
630
                            IOException ioe = new IOException();
611
                            ioe.initCause(ex);
631
                            ioe.initCause(ex);
(-)a0cd15490d3a (+152 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2013 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.settings.convertors;
43
44
import java.io.ByteArrayOutputStream;
45
import java.io.File;
46
import java.io.IOException;
47
import org.netbeans.junit.NbTestCase;
48
import org.openide.util.test.AnnotationProcessorTestUtils;
49
50
/**
51
 *
52
 * @author Jaroslav Tulach <jtulach@netbeans.org>
53
 */
54
public class FactoryMethodTest extends NbTestCase {
55
    private File src;
56
    private File dst;
57
58
    public FactoryMethodTest(String name) {
59
        super(name);
60
    }
61
62
    @Override
63
    protected void setUp() throws Exception {
64
        clearWorkDir();
65
        
66
        src = new File(getWorkDir(), "src");
67
        src.mkdirs();
68
69
        dst = new File(getWorkDir(), "dst");
70
        dst.mkdirs();
71
    }
72
    
73
    
74
    
75
    public void testMethodOfGivenNameMustExists() throws IOException {
76
        AnnotationProcessorTestUtils.makeSource(src, "tst.Bean", 
77
            "import org.netbeans.api.settings.FactoryMethod;",
78
            "@FactoryMethod(\"create\")",
79
            "public class Bean {",
80
            "}"
81
        );
82
        
83
        ByteArrayOutputStream os = new ByteArrayOutputStream();
84
        boolean res = AnnotationProcessorTestUtils.runJavac(src, null, dst, null, os);
85
        
86
        assertFalse("Compilation fails", res);
87
        String out = new String(os.toByteArray(), "UTF-8");
88
        
89
        if (out.indexOf(" Method named create was not found") == -1) {
90
            fail("Should warn about missing method\n" + out);
91
        }
92
    }
93
94
    public void testMethodOfGivenNameMustHaveNoArguments() throws IOException {
95
        AnnotationProcessorTestUtils.makeSource(src, "tst.Bean", 
96
            "import org.netbeans.api.settings.FactoryMethod;",
97
            "@FactoryMethod(\"create\")",
98
            "public class Bean {",
99
            "  public static Bean create(boolean x) { return null; }",
100
            "}"
101
        );
102
        
103
        ByteArrayOutputStream os = new ByteArrayOutputStream();
104
        boolean res = AnnotationProcessorTestUtils.runJavac(src, null, dst, null, os);
105
        
106
        assertFalse("Compilation fails", res);
107
        String out = new String(os.toByteArray(), "UTF-8");
108
        
109
        if (out.indexOf("no parameters") == -1) {
110
            fail("Should warn about arguments of the method\n" + out);
111
        }
112
    }
113
    public void testMethodOfGivenNameMustBeStatic() throws IOException {
114
        AnnotationProcessorTestUtils.makeSource(src, "tst.Bean", 
115
            "import org.netbeans.api.settings.FactoryMethod;",
116
            "@FactoryMethod(\"create\")",
117
            "public class Bean {",
118
            "  public Bean create() { return null; }",
119
            "}"
120
        );
121
        
122
        ByteArrayOutputStream os = new ByteArrayOutputStream();
123
        boolean res = AnnotationProcessorTestUtils.runJavac(src, null, dst, null, os);
124
        
125
        assertFalse("Compilation fails", res);
126
        String out = new String(os.toByteArray(), "UTF-8");
127
        
128
        if (out.indexOf("has to be static") == -1) {
129
            fail("Should warn method not being static\n" + out);
130
        }
131
    }
132
    
133
    public void testMethodOfGivenNameMustHaveTheSameReturnType() throws IOException {
134
        AnnotationProcessorTestUtils.makeSource(src, "tst.Bean", 
135
            "import org.netbeans.api.settings.FactoryMethod;",
136
            "@FactoryMethod(\"create\")",
137
            "public class Bean {",
138
            "  public static String create() { return null; }",
139
            "}"
140
        );
141
        
142
        ByteArrayOutputStream os = new ByteArrayOutputStream();
143
        boolean res = AnnotationProcessorTestUtils.runJavac(src, null, dst, null, os);
144
        
145
        assertFalse("Compilation fails", res);
146
        String out = new String(os.toByteArray(), "UTF-8");
147
        
148
        if (out.indexOf("must return Bean") == -1) {
149
            fail("Should about wrong return type\n" + out);
150
        }
151
    }
152
}
(-)a/settings/test/unit/src/org/netbeans/modules/settings/convertors/SerialDataConvertorTest.java (+33 lines)
Lines 56-61 Link Here
56
import java.util.*;
56
import java.util.*;
57
import junit.framework.Test;
57
import junit.framework.Test;
58
import junit.framework.TestSuite;
58
import junit.framework.TestSuite;
59
import org.netbeans.api.settings.FactoryMethod;
59
60
60
import org.netbeans.junit.*;
61
import org.netbeans.junit.*;
61
62
Lines 657-660 Link Here
657
        assertNotNull("Missing InstanceCookie", ic);
658
        assertNotNull("Missing InstanceCookie", ic);
658
        assertNotNull("the persisted object cannot be read", ic.instanceCreate());
659
        assertNotNull("the persisted object cannot be read", ic.instanceCreate());
659
    }
660
    }
661
    
662
    public void testFactoryMethod() throws IOException, ClassNotFoundException {
663
        DataFolder df = DataFolder.findFolder(FileUtil.getConfigRoot().createFolder("testFactoryMethod"));
664
        FileObject fo = df.getPrimaryFile().createData("test.settings");
665
        OutputStream os = fo.getOutputStream();
666
        os.write((
667
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
668
"<!DOCTYPE settings PUBLIC \"-//NetBeans//DTD Session settings 1.0//EN\" \"http://www.netbeans.org/dtds/sessionsettings-1_0.dtd\">\n" +
669
"<settings version=\"1.0\">\n" +
670
"  <instance class=\"" + FactoryBase.class.getName() + "\"/>\n" +
671
"</settings>\n"
672
        ).getBytes("UTF-8"));
673
        os.close();
674
        
675
        InstanceCookie ido = DataObject.find(fo).getCookie(InstanceCookie.class);
676
        FactoryBase fb = (FactoryBase) ido.instanceCreate();
677
        assertNotNull("Re-created OK!", fb);
678
    }
679
680
    @FactoryMethod("create")
681
    public static class FactoryBase implements Serializable {
682
        private FactoryBase() {
683
            throw new IllegalStateException("Don't call my default constructor");
684
        }
685
        
686
        FactoryBase(boolean ok) {
687
        }
688
        
689
        static FactoryBase create() {
690
            return new FactoryBase(true);
691
        }
692
    }
660
}
693
}
(-)a/settings/test/unit/src/org/netbeans/modules/settings/convertors/XMLPropertiesConvertorTest.java (+52 lines)
Lines 45-50 Link Here
45
package org.netbeans.modules.settings.convertors;
45
package org.netbeans.modules.settings.convertors;
46
46
47
import java.io.*;
47
import java.io.*;
48
import java.lang.ref.Reference;
49
import java.lang.ref.WeakReference;
50
import java.util.Properties;
51
import static junit.framework.Assert.assertEquals;
52
import static junit.framework.Assert.assertNotNull;
53
import org.netbeans.api.settings.ConvertAsProperties;
54
import org.netbeans.api.settings.FactoryMethod;
48
55
49
import org.netbeans.junit.NbTestCase;
56
import org.netbeans.junit.NbTestCase;
50
import org.netbeans.junit.RandomlyFails;
57
import org.netbeans.junit.RandomlyFails;
Lines 58-63 Link Here
58
import org.openide.filesystems.FileObject;
65
import org.openide.filesystems.FileObject;
59
import org.openide.filesystems.FileSystem;
66
import org.openide.filesystems.FileSystem;
60
import org.openide.filesystems.FileUtil;
67
import org.openide.filesystems.FileUtil;
68
import org.openide.filesystems.Repository;
61
import org.openide.filesystems.XMLFileSystem;
69
import org.openide.filesystems.XMLFileSystem;
62
import org.openide.loaders.*;
70
import org.openide.loaders.*;
63
import org.openide.modules.ModuleInfo;
71
import org.openide.modules.ModuleInfo;
Lines 352-357 Link Here
352
        assertEquals("Listener not deregistered", 0, obj.getListenerCount());
360
        assertEquals("Listener not deregistered", 0, obj.getListenerCount());
353
        assertNull(filename + ".settings was not deleted!", root.getFileObject(filename));
361
        assertNull(filename + ".settings was not deleted!", root.getFileObject(filename));
354
    }
362
    }
363
364
    public void testFactoryMethod() throws Exception {
365
        FileObject dtdFO = Repository.getDefault().getDefaultFileSystem().
366
            findResource("/xml/lookups/abc/x.instance");
367
        assertNotNull("Provider not found", dtdFO);
368
        Convertor c = XMLPropertiesConvertor.create(dtdFO);
369
        assertNotNull("Convertor created", c);
370
        
371
        DataFolder folder = DataFolder.findFolder(root);
372
        
373
        FactoryBase inst = FactoryBase.create();
374
        InstanceDataObject ido = InstanceDataObject.create(folder, null, inst, null);
375
376
        assertSame("Instance is there", inst, ido.instanceCreate());
377
        
378
        Reference<Object> ref = new WeakReference<Object>(inst);
379
        inst = null;
380
        
381
        assertGC("Instance can disappear", ref);
382
        
383
        Object obj = ido.instanceCreate();
384
        assertEquals("One can re-create it without default constructor", FactoryBase.class, obj.getClass());
385
    }
386
    
387
    @ConvertAsProperties(dtd = "-//abc/x")
388
    @FactoryMethod("create")
389
    public static class FactoryBase implements Serializable {
390
        public FactoryBase() {
391
            throw new IllegalStateException("Don't call my default constructor");
392
        }
393
        
394
        FactoryBase(boolean ok) {
395
        }
396
        
397
        public static FactoryBase create() {
398
            return new FactoryBase(true);
399
        }
400
        
401
        void readProperties(Properties p) {
402
        }
403
        
404
        void writeProperties(Properties p) {
405
        }
406
    }
355
    
407
    
356
    public void testModuleDisabling() throws Exception {
408
    public void testModuleDisabling() throws Exception {
357
        FileObject dtd = FileUtil.getConfigFile("xml/lookups/NetBeans_org_netbeans_modules_settings_testModuleDisabling/DTD_XML_FooSetting_1_0.instance");
409
        FileObject dtd = FileUtil.getConfigFile("xml/lookups/NetBeans_org_netbeans_modules_settings_testModuleDisabling/DTD_XML_FooSetting_1_0.instance");

Return to bug 227050