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

(-)9387523afe84 (+148 lines)
Added Link Here
1
<!--
2
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
4
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
6
7
The contents of this file are subject to the terms of either the GNU
8
General Public License Version 2 only ("GPL") or the Common
9
Development and Distribution License("CDDL") (collectively, the
10
"License"). You may not use this file except in compliance with the
11
License. You can obtain a copy of the License at
12
http://www.netbeans.org/cddl-gplv2.html
13
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
14
specific language governing permissions and limitations under the
15
License.  When distributing the software, include this License Header
16
Notice in each file and include the License file at
17
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
18
particular file as subject to the "Classpath" exception as provided
19
by Sun in the GPL Version 2 section of the License file that
20
accompanied this code. If applicable, add the following below the
21
License Header, with the fields enclosed by brackets [] replaced by
22
your own identifying information:
23
"Portions Copyrighted [year] [name of copyright owner]"
24
25
Contributor(s):
26
27
The Original Software is NetBeans. The Initial Developer of the Original
28
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
29
Microsystems, Inc. All Rights Reserved.
30
31
If you wish your version of this file to be governed by only the CDDL
32
or only the GPL Version 2, indicate your decision by adding
33
"[Contributor] elects to include this software in this distribution
34
under the [CDDL or GPL Version 2] license." If you do not indicate a
35
single choice of license, a recipient has the option to distribute
36
your version of this file under either the CDDL, the GPL Version 2 or
37
to extend the choice of license to its licensees as provided above.
38
However, if you add GPL Version 2 code and therefore, elected the GPL
39
Version 2 license, then the option applies only if the new code is
40
made subject to such option by the copyright holder.
41
-->
42
43
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
44
45
<html>
46
  <head>
47
    <title>org.netbeans.spi.editor.codegen</title>
48
  </head>
49
  <body>
50
51
  <p>
52
  The Code Generator SPI gives modules a chance to plug their own code generators
53
  into the popup that appears in the editor on the Insert Code action invocation.
54
  </p>
55
  
56
  
57
  <h3>Key parts of the SPI</h3>
58
  
59
  <p>
60
  The whole SPI is organized around the
61
  <code><a href="@org-netbeans-modules-editor-lib2@/org/netbeans/spi/editor/codegen/CodeGenerator.html">CodeGenerator</a></code>
62
  interface, which is the ultimate thing that modules need to implement in order to generate
63
  code snippets and insert them into a document on the Insert Code action invocation.
64
  The <code>CodeGenerator</code>s are created by
65
  <code><a href="@org-netbeans-modules-editor-lib2@/org/netbeans/spi/editor/codegen/CodeGenerator.Factory.html">CodeGenerator.Factory</a></code>
66
  instances.
67
  </p>
68
  
69
  <p>
70
  Instances of the
71
  <code><a href="@org-netbeans-modules-editor-lib2@/org/netbeans/spi/editor/codegen/CodeGeneratorContextProvider.html">CodeGeneratorContextProvider</a></code>
72
  interface serve for adding an additonal content to the context which is passed
73
  as a parameter to the
74
  <code><a href="@org-netbeans-modules-editor-lib2@/org/netbeans/spi/editor/codegen/CodeGenerator.Factory.html#create(org.openide.util.Lookup)">CodeGenerator.Factory.create</a></code>
75
  method.
76
  </p>
77
  
78
  
79
  <h3>CodeGenerator and CodeGeneratorContextProvider registration</h3>
80
  
81
  <p>
82
  The registration of <code>CodeGenerator</code>s has to be done through an
83
  instance of the <code>CodeGenerator.Factory</code> class. The factory should
84
  be registered in <code>MimeLookup</code> under the mime-type of documents, which
85
  the <code>CodeGenerator</code> should be used for, in the <code>CodeGenerators</code>
86
  folder. For example, if a module wants to provide <code>CodeGenerator</code>
87
  for <code>text/x-something</code> documents, it should implement its own
88
  <code>CodeGenerator.Factory</code> (e.g. <code>org.some.module.CGFactory</code>
89
  class) and register it in <code>MimeLookup</code> using its XML layer as it is
90
  shown on the example below.
91
  </p>
92
  
93
  <pre>
94
&lt;folder name="Editors"&gt;
95
  &lt;folder name="text"&gt;
96
    &lt;folder name="x-something"&gt;
97
      &lt;folder name="CodeGenerators"&gt;
98
        &lt;file name="org-some-module-CGFactory.instance" /&gt;
99
      &lt;/folder&gt;
100
    &lt;/folder&gt;
101
  &lt;/folder&gt;
102
&lt;/folder&gt;
103
  </pre>
104
105
  <p>
106
  The <code>CGFactory</code> class will simply return a new instance of
107
  the module's implementation of the <code>CodeGenerator</code> interface from its
108
  <code><a href="@org-netbeans-modules-editor-lib2@/org/netbeans/spi/editor/codegen/CodeGenerator.Factory.html#create(org.openide.util.Lookup)">create</a></code>
109
  method. The method can create and return multiple <code>CodeGenerator</code>s.
110
  </p>
111
112
  <p>
113
  The parameter of the <code>create</code> method provides by default access to
114
  the <code>JTextComponent</code>, which the generator is being created for. However,
115
  a group of factories could exist for a mime-type which require access to
116
  an additional data (e.g. some parser result, etc.) when creating their
117
  <code>CodeGenerator</code>s. To that purpose, an instance of 
118
  <code>CodeGeneratorContextProvider</code> interface could be created and registered
119
  in <code>MimeLookup</code> under the mime-type in the <code>CodeGeneratorContextProviders</code>
120
  folder. For example, if a module wants to provide an additional context for
121
  <code>text/x-something</code> <code>CodeGenerator.Factory</code> it should
122
  implement its own <code>CodeGeneratorContextProvider</code>
123
  (e.g. <code>org.some.module.CGContextProvider</code> class) and register it in
124
  <code>MimeLookup</code> using its XML layer as it is shown on the example below.
125
  </p>
126
  
127
  <pre>
128
&lt;folder name="Editors"&gt;
129
  &lt;folder name="text"&gt;
130
    &lt;folder name="x-something"&gt;
131
      &lt;folder name="CodeGeneratorContextProviders"&gt;
132
        &lt;file name="org-some-module-CGContextProvider.instance" /&gt;
133
      &lt;/folder&gt;
134
    &lt;/folder&gt;
135
  &lt;/folder&gt;
136
&lt;/folder&gt;
137
  </pre>
138
139
  <p>
140
  The <code>CGContextProvider</code> class in its
141
  <code><a href="@org-netbeans-modules-editor-lib2@/org/netbeans/spi/editor/codegen/CodeGeneratorContextProvider.html#runTaskWithinContext(org.openide.util.Lookup,Task)">runTaskWithinContext</a></code>
142
  method creates the new context by merging the original context content
143
  with the additional data and runs the task obtained as the parameter with the newly
144
  created context. 
145
  </p>
146
  
147
  </body>
148
</html>
(-)9387523afe84 (+184 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
package org.netbeans.modules.editor.codegen;
42
43
import javax.swing.text.AbstractDocument;
44
import javax.swing.text.Document;
45
import org.netbeans.api.editor.mimelookup.MimePath;
46
import org.netbeans.api.lexer.TokenHierarchy;
47
import org.netbeans.api.lexer.TokenSequence;
48
import org.netbeans.modules.editor.*;
49
import java.awt.Point;
50
import java.awt.Rectangle;
51
import java.awt.event.ActionEvent;
52
import java.util.ArrayList;
53
import java.util.Iterator;
54
import java.util.List;
55
import javax.swing.JMenuItem;
56
import javax.swing.SwingUtilities;
57
import javax.swing.text.BadLocationException;
58
import javax.swing.text.JTextComponent;
59
import org.netbeans.api.editor.mimelookup.MimeLookup;
60
import org.netbeans.editor.BaseAction;
61
import org.netbeans.editor.ext.ExtKit;
62
import org.netbeans.spi.editor.codegen.CodeGenerator;
63
import org.netbeans.spi.editor.codegen.CodeGeneratorContextProvider;
64
import org.openide.util.Lookup;
65
import org.openide.util.NbBundle;
66
import org.openide.util.lookup.Lookups;
67
68
/**
69
 *
70
 * @author Dusan Balek, Jan Lahoda
71
 */
72
public class NbGenerateCodeAction extends BaseAction {
73
74
    public static final String generateCode = "generate-code"; //NOI18N
75
    
76
    public NbGenerateCodeAction(){
77
        super(generateCode);
78
        putValue(ExtKit.TRIMMED_TEXT, NbBundle.getBundle(NbGenerateCodeAction.class).getString("generate-code-trimmed")); //NOI18N
79
        putValue(SHORT_DESCRIPTION, NbBundle.getBundle(NbGenerateCodeAction.class).getString("desc-generate-code")); //NOI18N
80
        putValue(POPUP_MENU_TEXT, NbBundle.getBundle(NbGenerateCodeAction.class).getString("popup-generate-code")); //NOI18N
81
    }
82
    
83
    public void actionPerformed(ActionEvent evt, final JTextComponent target) {
84
        Task task = new Task(getFullMimePath(target.getDocument(), target.getCaretPosition()));
85
        task.run(Lookups.singleton(target));
86
        if (task.codeGenerators.size() > 0) {
87
            int altHeight = -1;
88
            Point where = null;
89
            try {
90
                Rectangle carretRectangle = target.modelToView(target.getCaretPosition());
91
                altHeight = carretRectangle.height;
92
                where = new Point( carretRectangle.x, carretRectangle.y + carretRectangle.height );
93
                SwingUtilities.convertPointToScreen(where, target);
94
            } catch (BadLocationException ble) {
95
            }
96
            if (where == null)
97
                where = new Point(-1, -1);
98
            PopupUtil.showPopup(new GenerateCodePanel(target, task.codeGenerators), null, where.x, where.y, true, altHeight);
99
        } else {
100
            target.getToolkit().beep();
101
        }
102
    }
103
    
104
    static String[] test(Document doc, int pos) {
105
        Task task = new Task(getFullMimePath(doc, pos));
106
        task.run(Lookups.fixed());
107
        String[] ret = new String[task.codeGenerators.size()];
108
        int i = 0;
109
        for (CodeGenerator codeGenerator : task.codeGenerators)
110
            ret[i++] = codeGenerator.getDisplayName();
111
        return ret;
112
    }
113
    
114
    private static MimePath getFullMimePath(Document document, int offset) {
115
        String langPath = null;
116
117
        if (document instanceof AbstractDocument) {
118
            AbstractDocument adoc = (AbstractDocument)document;
119
            adoc.readLock();
120
            try {
121
                List<TokenSequence<?>> list = TokenHierarchy.get(document).embeddedTokenSequences(offset, true);
122
                if (list.size() > 1) {
123
                    langPath = list.get(list.size() - 1).languagePath().mimePath();
124
                }
125
            } finally {
126
                adoc.readUnlock();
127
            }
128
        }
129
130
        if (langPath == null) {
131
            langPath = NbEditorUtilities.getMimeType(document);
132
        }
133
134
        if (langPath != null) {
135
            return MimePath.parse(langPath);
136
        } else {
137
            return null;
138
        }
139
    }
140
141
    private static class Task implements CodeGeneratorContextProvider.Task {
142
        private MimePath mimePath;
143
        private Iterator<? extends CodeGeneratorContextProvider> contextProviders;
144
        private List<CodeGenerator> codeGenerators = new ArrayList<CodeGenerator>(); 
145
146
        private Task(MimePath mimePath) {
147
            this.mimePath = mimePath;
148
            contextProviders = MimeLookup.getLookup(mimePath).lookupAll(CodeGeneratorContextProvider.class).iterator();
149
        }
150
151
        public void run(Lookup context) {
152
            if (contextProviders.hasNext()) {
153
                contextProviders.next().runTaskWithinContext(context, this);
154
            } else {
155
                for (CodeGenerator.Factory factory : MimeLookup.getLookup(mimePath).lookupAll(CodeGenerator.Factory.class))
156
                    codeGenerators.addAll(factory.create(context));
157
            }
158
        }
159
    }
160
    
161
    public static final class GlobalAction extends MainMenuAction {
162
163
        private final JMenuItem menuPresenter;
164
        
165
        public GlobalAction() {
166
            super();
167
            this.menuPresenter = new JMenuItem(getMenuItemText());
168
            setMenu();
169
        }
170
        
171
        protected String getMenuItemText() {
172
            return NbBundle.getBundle(GlobalAction.class).getString("generate-code-main-menu-source-item"); //NOI18N
173
        }
174
175
        protected String getActionName() {
176
            return generateCode;
177
        }
178
179
        public JMenuItem getMenuPresenter() {
180
            return menuPresenter;
181
        }
182
        
183
    } // End of GlobalAction class
184
}
(-)9387523afe84 (+85 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
package org.netbeans.modules.editor.codegen;
42
43
import javax.swing.text.Document;
44
import org.netbeans.modules.editor.*;
45
import java.net.URL;
46
import javax.swing.text.DefaultStyledDocument;
47
import junit.framework.TestCase;
48
49
/**
50
 *
51
 * @author Dusan Balek
52
 */
53
public class CodeGenerationTest extends TestCase {
54
55
    public CodeGenerationTest(String testName) {
56
        super(testName);
57
    }
58
59
    // TODO add test methods here. The name must begin with 'test'. For example:
60
    // public void testHello() {}
61
    protected void setUp() throws Exception {
62
        EditorTestLookup.setLookup(
63
                new URL[]{EditorTestConstants.EDITOR_LAYER_URL,
64
                    getClass().getClassLoader().getResource("org/netbeans/modules/editor/resources/codegen-test-layer.xml")
65
                },
66
                new Object[]{},
67
                getClass().getClassLoader());
68
    }
69
70
    public void testSimpleCodeGenerator() {
71
        Document doc = new DefaultStyledDocument();
72
        doc.putProperty(NbEditorDocument.MIME_TYPE_PROP, "text/x-simple-codegen-test");
73
        String[] generatorNames = NbGenerateCodeAction.test(doc, 0);
74
        assertEquals(generatorNames.length, 1);
75
        assertEquals(generatorNames[0], "SimpleCodeGenerator");
76
    }
77
78
    public void testCodeGenerator() {
79
        Document doc = new DefaultStyledDocument();
80
        doc.putProperty(NbEditorDocument.MIME_TYPE_PROP, "text/x-codegen-test");
81
        String[] generatorNames = NbGenerateCodeAction.test(doc, 0);
82
        assertEquals(generatorNames.length, 1);
83
        assertEquals(generatorNames[0], "CodeGenerator");
84
    }
85
}
(-)9387523afe84 (+83 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
4
 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5
 * 
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 * 
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 * 
35
 * Contributor(s):
36
 * 
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.editor.codegen;
41
42
import java.util.Collections;
43
import java.util.List;
44
import org.netbeans.spi.editor.codegen.CodeGenerator;
45
import org.netbeans.spi.editor.codegen.CodeGeneratorContextProvider;
46
import org.openide.util.Lookup;
47
import org.openide.util.lookup.Lookups;
48
import org.openide.util.lookup.ProxyLookup;
49
50
/**
51
 *
52
 * @author Dusan Balek
53
 */
54
public class TestCodeGenerator implements CodeGenerator {
55
    
56
    private boolean b;
57
    
58
    public TestCodeGenerator(boolean b) {
59
        this.b = b;
60
    }
61
    
62
    public String getDisplayName() {
63
        return b ? "CodeGenerator" : "SimpleCodeGenerator";
64
    }
65
66
    public void invoke() {
67
    }
68
69
    public static class Factory implements CodeGenerator.Factory {
70
71
        public List<? extends CodeGenerator> create(Lookup context) {
72
            Object o = context.lookup(ContextProvider.class);
73
            return Collections.singletonList(new TestCodeGenerator(o != null));            
74
        }        
75
    }
76
77
    public static class ContextProvider implements CodeGeneratorContextProvider {
78
79
        public void runTaskWithinContext(Lookup context, Task task) {
80
            task.run(new ProxyLookup(context, Lookups.singleton(this)));
81
        }
82
    }
83
}
(-)9387523afe84 (+63 lines)
Added Link Here
1
<?xml version="1.0"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
44
45
<filesystem>
46
    <folder name="Editors">
47
        <folder name="text">
48
            <folder name="x-simple-codegen-test">
49
                <folder name="CodeGenerators">
50
                    <file name="org-netbeans-modules-editor-codegen-TestCodeGenerator$Factory.instance"/>
51
                </folder>
52
            </folder>
53
            <folder name="x-codegen-test">
54
                <folder name="CodeGeneratorContextProviders">
55
                    <file name="org-netbeans-modules-editor-codegen-TestCodeGenerator$ContextProvider.instance"/>
56
                </folder>                
57
                <folder name="CodeGenerators">
58
                    <file name="org-netbeans-modules-editor-codegen-TestCodeGenerator$Factory.instance"/>
59
                </folder>
60
            </folder>
61
        </folder>
62
    </folder>
63
</filesystem>

Return to bug 134239