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

(-)a/openide.loaders/src/org/netbeans/modules/openide/loaders/DataObjectFactoryProcessor.java (-81 / +93 lines)
Lines 68-180 Link Here
68
 */
68
 */
69
@ServiceProvider(service = Processor.class)
69
@ServiceProvider(service = Processor.class)
70
@SupportedSourceVersion(SourceVersion.RELEASE_6)
70
@SupportedSourceVersion(SourceVersion.RELEASE_6)
71
@SupportedAnnotationTypes("org.openide.loaders.DataObject.Registration")
71
@SupportedAnnotationTypes({"org.openide.loaders.DataObject.Registration", "org.openide.loaders.DataObject.Registrations"})
72
public class DataObjectFactoryProcessor extends LayerGeneratingProcessor {
72
public class DataObjectFactoryProcessor extends LayerGeneratingProcessor {
73
73
    @Override
74
    @Override
74
    protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) throws LayerGenerationException {
75
    protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) throws LayerGenerationException {
75
        if (roundEnv.processingOver()) {
76
        if (roundEnv.processingOver()) {
76
            return false;
77
            return false;
77
        }
78
        }
78
        TypeMirror dataObjectType = type(DataObject.class);
79
        TypeMirror fileObjectType = type(FileObject.class);
80
        TypeMirror multiFileLoaderType = type(MultiFileLoader.class);
81
        TypeMirror dataObjectFactoryType = type(DataObject.Factory.class);
82
83
79
84
        for (Element e : roundEnv.getElementsAnnotatedWith(DataObject.Registration.class)) {
80
        for (Element e : roundEnv.getElementsAnnotatedWith(DataObject.Registration.class)) {
85
            DataObject.Registration dfr = e.getAnnotation(DataObject.Registration.class);
81
            DataObject.Registration dfr = e.getAnnotation(DataObject.Registration.class);
86
            if (dfr == null) {
82
            if (dfr == null) {
87
                continue;
83
                continue;
88
            }
84
            }
89
            LayerBuilder builder = layer(e);
85
            process(e, dfr);
90
            //need class name to generate id and factory dataObjectClass parameter
86
        }
91
            String className = processingEnv.getElementUtils().getBinaryName((TypeElement)e).toString();
87
        for (Element e : roundEnv.getElementsAnnotatedWith(DataObject.Registrations.class)) {
92
            String factoryId = className.replace(".", "-");
88
            DataObject.Registrations dfrr = e.getAnnotation(DataObject.Registrations.class);
89
            if (dfrr == null) {
90
                continue;
91
            }
92
            for (DataObject.Registration t : dfrr.value()) {
93
                process(e, t);
94
            }
95
        }
96
        return true;
97
    }
93
98
94
            boolean useFactory = true;
99
    //
100
    private void process(Element e, DataObject.Registration dfr) throws LayerGenerationException {
101
        TypeMirror dataObjectType = type(DataObject.class);
102
        TypeMirror fileObjectType = type(FileObject.class);
103
        TypeMirror multiFileLoaderType = type(MultiFileLoader.class);
104
        TypeMirror dataObjectFactoryType = type(DataObject.Factory.class);
105
        LayerBuilder builder = layer(e);
106
        //need class name to generate id and factory dataObjectClass parameter
107
        String className = processingEnv.getElementUtils().getBinaryName((TypeElement) e).toString();
108
        String factoryId = className.replace(".", "-");
95
109
96
            // test if enclosing element is of DataObject type;
110
        boolean useFactory = true;
97
111
98
            if (isAssignable(e.asType(), dataObjectType)) {
112
        // test if enclosing element is of DataObject type;
99
                //attempt to use default factory 
100
                List<Element> ee = new LinkedList<Element>();
101
                // should be a public constructor with FileObject and MultiFileLoader as param
102
                for (ExecutableElement element : ElementFilter.constructorsIn(e.getEnclosedElements())) {
103
113
104
                    if ((element.getKind() == ElementKind.CONSTRUCTOR) && (element.getModifiers().contains(Modifier.PUBLIC))) {  // found a public constructor ;                        
114
        if (isAssignable(e.asType(), dataObjectType)) {
105
                        if ((element.getParameters().size() == 2) // parameters of constructor ok
115
            //attempt to use default factory 
106
                                && (isAssignable(element.getParameters().get(0).asType(), fileObjectType))
116
            List<Element> ee = new LinkedList<Element>();
107
                                && (isAssignable(element.getParameters().get(1).asType(), multiFileLoaderType))) {
117
            // should be a public constructor with FileObject and MultiFileLoader as param
108
                            ee.add(element);
118
            for (ExecutableElement element : ElementFilter.constructorsIn(e.getEnclosedElements())) {
109
                        }
119
120
                if ((element.getKind() == ElementKind.CONSTRUCTOR) && (element.getModifiers().contains(Modifier.PUBLIC))) {  // found a public constructor ;                        
121
                    if ((element.getParameters().size() == 2) // parameters of constructor ok
122
                            && (isAssignable(element.getParameters().get(0).asType(), fileObjectType))
123
                            && (isAssignable(element.getParameters().get(1).asType(), multiFileLoaderType))) {
124
                        ee.add(element);
110
                    }
125
                    }
111
                }
126
                }
112
                // nothing is found 
127
            }
113
                if (ee.isEmpty()) {
128
            // nothing is found 
114
                    throw new LayerGenerationException("DataObject subclass with @DataObject.Registration needs a public constructor with FileObject and MultiFileLoader parameters", e, processingEnv, dfr); // NOI18N
129
            if (ee.isEmpty()) {
115
                } else {
130
                throw new LayerGenerationException("DataObject subclass with @DataObject.Registration needs a public constructor with FileObject and MultiFileLoader parameters", e, processingEnv, dfr); // NOI18N
116
                    useFactory = true;
131
            } else {
117
                }
132
                useFactory = true;
133
            }
118
134
119
            } else if (isAssignable(e.asType(), dataObjectFactoryType)) {
135
        } else if (isAssignable(e.asType(), dataObjectFactoryType)) {
120
                List<Element> ee = new LinkedList<Element>();
136
            List<Element> ee = new LinkedList<Element>();
121
                for (ExecutableElement element : ElementFilter.constructorsIn(e.getEnclosedElements())) {
137
            for (ExecutableElement element : ElementFilter.constructorsIn(e.getEnclosedElements())) {
122
                    if ((element.getKind() == ElementKind.CONSTRUCTOR) && (element.getModifiers().contains(Modifier.PUBLIC))) {  // found a public constructor ;                        
138
                if ((element.getKind() == ElementKind.CONSTRUCTOR) && (element.getModifiers().contains(Modifier.PUBLIC))) {  // found a public constructor ;                        
123
                        if ((element.getParameters().isEmpty())) {// parameters of constructor ok
139
                    if ((element.getParameters().isEmpty())) {// parameters of constructor ok
124
                            ee.add(element);
140
                        ee.add(element);
125
                        }
126
                    }
141
                    }
127
                }
142
                }
128
                if (ee.isEmpty()) {
143
            }
129
                    throw new LayerGenerationException("DataObject.Factory subclass with @DataObject.Registration needs a public default constructor", e, processingEnv, dfr); // NOI18N
144
            if (ee.isEmpty()) {
130
                } else {
145
                throw new LayerGenerationException("DataObject.Factory subclass with @DataObject.Registration needs a public default constructor", e, processingEnv, dfr); // NOI18N
131
                    useFactory = false;
132
                    factoryId = className.replace(".class", "").replace(".", "-");
133
                }
134
            } else {
146
            } else {
135
                throw new LayerGenerationException("Usage @DataObject.Registration only on DataObject.Factory subclass or DataObject subclass", e, processingEnv, dfr); // NOI18N
147
                useFactory = false;
148
                factoryId = className.replace(".class", "").replace(".", "-");
149
            }
150
        } else {
151
            throw new LayerGenerationException("Usage @DataObject.Registration only on DataObject.Factory subclass or DataObject subclass", e, processingEnv, dfr); // NOI18N
152
        }
153
154
        // check if mimeType annotation is set
155
        if (dfr.mimeType().length == 0) {
156
            throw new LayerGenerationException("@DataObject.Factory.Registration mimeTypes() cannot be null", e, processingEnv, dfr, "mimeTypes");
157
        }
158
        // verify if all mimeType are valid
159
        for (String aMimeType : dfr.mimeType()) {
160
            if (aMimeType.isEmpty()) {
161
                throw new LayerGenerationException("@DataObject.Factory.Registration mimeTypes() cannot have a empty mimeType", e, processingEnv, dfr, "mimeTypes");
162
            }
163
        }
164
165
166
        for (String aMimeType : dfr.mimeType()) {
167
            LayerBuilder.File f = builder.file("Loaders/" + aMimeType + "/Factories/" + factoryId + ".instance");
168
169
            // iconBase is optional but if set then shoud be in classpath
170
            if (dfr.iconBase().length() > 0) {
171
                builder.validateResource(dfr.iconBase(), e.getEnclosingElement(), dfr, "icon", true);
172
                f.stringvalue("iconBase", dfr.iconBase());
173
            }
174
            // position LayerBuilder 
175
            f.position(dfr.position());
176
177
            if (!dfr.displayName().isEmpty()) {
178
                f.bundlevalue("displayName", dfr.displayName(), dfr, "displayName");
136
            }
179
            }
137
180
138
            // check if mimeType annotation is set
181
            if (useFactory) {
139
            if (dfr.mimeType().length == 0) {
182
                f.methodvalue("instanceCreate", "org.openide.loaders.DataLoaderPool", "factory");
140
                throw new LayerGenerationException("@DataObject.Factory.Registration mimeTypes() cannot be null", e, processingEnv, dfr, "mimeTypes");
183
                f.stringvalue("dataObjectClass", className);
184
                // if factory mimetype is needed otherwise not
185
                f.stringvalue("mimeType", aMimeType);
186
141
            }
187
            }
142
            // verify if all mimeType are valid
188
            f.write();
143
            for (String aMimeType : dfr.mimeType()) {
144
                if (aMimeType.isEmpty()) {
145
                    throw new LayerGenerationException("@DataObject.Factory.Registration mimeTypes() cannot have a empty mimeType", e, processingEnv, dfr, "mimeTypes");
146
                }
147
            }
148
149
150
            for (String aMimeType : dfr.mimeType()) {
151
                LayerBuilder.File f = builder.file("Loaders/" + aMimeType + "/Factories/" + factoryId + ".instance");
152
153
                // iconBase is optional but if set then shoud be in classpath
154
                if (dfr.iconBase().length() > 0) {
155
                    builder.validateResource(dfr.iconBase(), e.getEnclosingElement(), dfr, "icon", true);
156
                    f.stringvalue("iconBase", dfr.iconBase());
157
                }
158
                // position LayerBuilder 
159
                f.position(dfr.position());
160
161
                if (!dfr.displayName().isEmpty()) {
162
                    f.bundlevalue("displayName", dfr.displayName(), dfr, "displayName");
163
                }
164
165
                if (useFactory) {
166
                    f.methodvalue("instanceCreate", "org.openide.loaders.DataLoaderPool", "factory");
167
                    f.stringvalue("dataObjectClass", className);
168
                    // if factory mimetype is needed otherwise not
169
                    f.stringvalue("mimeType", aMimeType);
170
171
                }
172
                f.write();
173
            }
174
175
        }
189
        }
176
177
        return true;
178
    }
190
    }
179
191
180
    // reuse from Action Processor
192
    // reuse from Action Processor
(-)a/openide.loaders/src/org/openide/loaders/DataObject.java (+12 lines)
Lines 1206-1211 Link Here
1206
        int position() default Integer.MAX_VALUE;
1206
        int position() default Integer.MAX_VALUE;
1207
    }
1207
    }
1208
    
1208
    
1209
     /**
1210
     * May be uses to allow multiple {@link DataObject.Registration DataObject.Registration} at one place.
1211
     * @since 7.36
1212
     */
1213
    @Retention(RetentionPolicy.SOURCE)
1214
    @Target({ElementType.TYPE})
1215
    public static @interface Registrations {
1216
        
1217
        Registration[] value();
1218
    }
1219
    
1220
    
1209
    /** Registry of modified data objects.
1221
    /** Registry of modified data objects.
1210
     * The registry permits attaching of a change listener
1222
     * The registry permits attaching of a change listener
1211
    * to be informed when the count of modified objects changes.
1223
    * to be informed when the count of modified objects changes.
(-)a/openide.loaders/test/unit/src/org/netbeans/modules/openide/loaders/DataObjectFactoryProcessorTest.java (-19 / +20 lines)
Lines 45-53 Link Here
45
import java.io.ByteArrayOutputStream;
45
import java.io.ByteArrayOutputStream;
46
import java.io.IOException;
46
import java.io.IOException;
47
import java.io.OutputStream;
47
import java.io.OutputStream;
48
import java.io.PrintStream;
49
import org.netbeans.junit.NbTestCase;
48
import org.netbeans.junit.NbTestCase;
50
import org.netbeans.modules.openide.loaders.data.DoFPDataObject;
49
import org.netbeans.modules.openide.loaders.data.DoFPDataObject;
50
import org.netbeans.modules.openide.loaders.data.DoFPDataObjectMultiple;
51
import org.openide.filesystems.FileLock;
51
import org.openide.filesystems.FileLock;
52
import org.openide.filesystems.FileObject;
52
import org.openide.filesystems.FileObject;
53
import org.openide.filesystems.FileUtil;
53
import org.openide.filesystems.FileUtil;
Lines 78-84 Link Here
78
    @Override
78
    @Override
79
    protected void setUp() throws Exception {
79
    protected void setUp() throws Exception {
80
        super.setUp();
80
        super.setUp();
81
        createMIMEs();
82
    }
81
    }
83
82
84
// Several test for javac
83
// Several test for javac
Lines 210-216 Link Here
210
            assertEquals("DataObjectClass found", DoFPDataObject.class.getName(), fo.getAttribute("dataObjectClass"));
209
            assertEquals("DataObjectClass found", DoFPDataObject.class.getName(), fo.getAttribute("dataObjectClass"));
211
210
212
        }
211
        }
212
        {
213
            FileObject fo = FileUtil.getConfigFile(
214
                    "Loaders/text/testm3/Factories/" + DoFPDataObjectMultiple.class.getName().replace(".", "-") + ".instance");
215
            assertNotNull("File found", fo);
213
216
217
            assertEquals("Position Ok", 4050, fo.getAttribute("position"));
218
            assertEquals("Label Ok", "labeltestm1", fo.getAttribute("displayName"));
219
            assertEquals("MimeOk", "text/testm3", fo.getAttribute("mimeType"));
220
            Object icon = fo.getAttribute("iconBase");
221
            assertEquals("Icon found", "org/openide/loaders/unknown.gif", icon);
222
            assertEquals("DataObjectClass found", DoFPDataObjectMultiple.class.getName(), fo.getAttribute("dataObjectClass"));
223
224
        }
214
    }
225
    }
215
226
216
// use external DoFP* class and their registration to test if dataobject return is good
227
// use external DoFP* class and their registration to test if dataobject return is good
Lines 233-257 Link Here
233
            assertEquals("text/test3", fo.getMIMEType());
244
            assertEquals("text/test3", fo.getMIMEType());
234
            // XXX DoFPCustomLoader not loaded cannot assert for loader
245
            // XXX DoFPCustomLoader not loaded cannot assert for loader
235
        }
246
        }
247
        {
248
            FileObject fo = createXmlFile("sdfsdf", ".ttm2");
249
            assertEquals("text/testm2", fo.getMIMEType());
250
            DataObject find = DataObject.find(fo);
251
            assertEquals("DataLoader type", DoFPDataObjectMultiple.class, find.getClass());
252
        }
236
    }
253
    }
237
254
238
    // utility method inspired by FsMimeResolverTest
255
   
239
    private void createMIMEs() throws Exception {
240
// create  resolver to get tt1 extension resolve as test/test1 and do so for 3 different
241
        FileObject resolver = FileUtil.createData(FileUtil.getConfigRoot(), "Services/MIMEResolver/resolver.xml");
242
        OutputStream os = resolver.getOutputStream();
243
        PrintStream ps = new PrintStream(os);
244
        ps.println("<!DOCTYPE MIME-resolver PUBLIC '-//NetBeans//DTD MIME Resolver 1.0//EN' 'http://www.netbeans.org/dtds/mime-resolver-1_0.dtd'>");
245
        ps.println("<MIME-resolver>");
246
        for (int i = 1; i < 4; i++) {
247
            ps.println(" <file>");
248
            ps.println("  <ext name=\"tt" + i + "\"/>");
249
            ps.println("    <resolver mime=\"text/test" + i + "\"/>");
250
            ps.println(" </file>");
251
        }
252
        ps.println("</MIME-resolver>");
253
        os.close();
254
    }
255
256
256
    private FileObject createXmlFile(String content, String ext) throws Exception {
257
    private FileObject createXmlFile(String content, String ext) throws Exception {
257
        FileObject file = FileUtil.createMemoryFileSystem().getRoot().createData("file" + ext);
258
        FileObject file = FileUtil.createMemoryFileSystem().getRoot().createData("file" + ext);
(-)a/openide.loaders/test/unit/src/org/netbeans/modules/openide/loaders/data/DoFPDataObjectMultiple.java (+114 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 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 2012 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.openide.loaders.data;
43
44
import java.io.IOException;
45
import org.openide.filesystems.FileObject;
46
import org.openide.loaders.DataFolder;
47
import org.openide.loaders.DataObject;
48
import org.openide.loaders.DataObjectExistsException;
49
import org.openide.loaders.MultiFileLoader;
50
import org.openide.util.HelpCtx;
51
52
/**
53
 * @see DataObjectFactoryProcessorTest
54
 * @author Eric Barboni <skygo@netbeans.org>
55
 */
56
@DataObject.Registrations({
57
    @DataObject.Registration(mimeType = {"text/testm1", "text/testm2"}, displayName = "labeltest", position = 3565, iconBase = "org/openide/loaders/unknown.gif"),
58
    @DataObject.Registration(mimeType = {"text/testm3"}, displayName = "labeltestm1", position = 4050, iconBase = "org/openide/loaders/unknown.gif")})
59
public class DoFPDataObjectMultiple extends DataObject {
60
61
    public DoFPDataObjectMultiple(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException {
62
        super(pf, loader);
63
    }
64
65
    @Override
66
    public boolean isDeleteAllowed() {
67
        throw new UnsupportedOperationException("Not supported yet.");
68
    }
69
70
    @Override
71
    public boolean isCopyAllowed() {
72
        throw new UnsupportedOperationException("Not supported yet.");
73
    }
74
75
    @Override
76
    public boolean isMoveAllowed() {
77
        throw new UnsupportedOperationException("Not supported yet.");
78
    }
79
80
    @Override
81
    public boolean isRenameAllowed() {
82
        throw new UnsupportedOperationException("Not supported yet.");
83
    }
84
85
    @Override
86
    public HelpCtx getHelpCtx() {
87
        throw new UnsupportedOperationException("Not supported yet.");
88
    }
89
90
    @Override
91
    protected DataObject handleCopy(DataFolder f) throws IOException {
92
        throw new UnsupportedOperationException("Not supported yet.");
93
    }
94
95
    @Override
96
    protected void handleDelete() throws IOException {
97
        throw new UnsupportedOperationException("Not supported yet.");
98
    }
99
100
    @Override
101
    protected FileObject handleRename(String name) throws IOException {
102
        throw new UnsupportedOperationException("Not supported yet.");
103
    }
104
105
    @Override
106
    protected FileObject handleMove(DataFolder df) throws IOException {
107
        throw new UnsupportedOperationException("Not supported yet.");
108
    }
109
110
    @Override
111
    protected DataObject handleCreateFromTemplate(DataFolder df, String name) throws IOException {
112
        throw new UnsupportedOperationException("Not supported yet.");
113
    }
114
}
(-)a/openide.loaders/test/unit/src/org/netbeans/modules/openide/loaders/data/DoFPMIMEType.java (+75 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 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 2012 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.openide.loaders.data;
43
44
import org.openide.filesystems.MIMEResolver;
45
46
/**
47
 *
48
 * @author Eric Barboni <skygo@netbeans.org>
49
 */
50
public class DoFPMIMEType {
51
52
    @MIMEResolver.ExtensionRegistration(displayName = "tt1", extension = "tt1", mimeType = "text/test1",position=1000)
53
    public void tt1() {
54
    }
55
56
    @MIMEResolver.ExtensionRegistration(displayName = "tt2", extension = "tt2", mimeType = "text/test2",position=1001)
57
    public void tt2() {
58
    }
59
60
    @MIMEResolver.ExtensionRegistration(displayName = "tt3", extension = "tt3", mimeType = "text/test3",position=1002)
61
    public void tt3() {
62
    }
63
64
    @MIMEResolver.ExtensionRegistration(displayName = "ttm1", extension = "ttm1", mimeType = "text/testm1",position=1003)
65
    public void ttm1() {
66
    }
67
68
    @MIMEResolver.ExtensionRegistration(displayName = "ttm2", extension = "ttm2", mimeType = "text/testm2",position=1004)
69
    public void ttm2() {
70
    }
71
72
    @MIMEResolver.ExtensionRegistration(displayName = "ttm3", extension = "ttm3", mimeType = "text/testm3",position=1005)
73
    public void ttm3() {
74
    }
75
}

Return to bug 207219