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.

Bug 191031 - MimeRegistrations doesn't work?
Summary: MimeRegistrations doesn't work?
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-15 14:23 UTC by Vladimir Voskresensky
Modified: 2010-10-17 08:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2010-10-15 14:23:15 UTC
@MimeRegistrations({
@MimeRegistration(service=org.netbeans.modules.spellchecker.spi.language.TokenListProvider.class, mimeType="text/x-c"),
@MimeRegistration(service=org.netbeans.modules.spellchecker.spi.language.TokenListProvider.class, mimeType="text/x-c++")
})
public class CndTokenListProvider implements TokenListProvider {
}

impossible to compiling file where MimeRegistrations are used:
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.ClassCastException: com.sun.tools.javac.util.List cannot be cast to [Ljavax.lang.model.element.AnnotationMirror;
        at org.netbeans.modules.editor.mimelookup.CreateRegistrationProcessor.handleProcess(CreateRegistrationProcessor.java:101)
        at org.openide.filesystems.annotations.LayerGeneratingProcessor.process(LayerGeneratingProcessor.java:124)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:624)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:553)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:698)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
        at com.sun.tools.javac.main.Main.compile(Main.java:353)
        at com.sun.tools.javac.main.Main.compile(Main.java:279)
        at com.sun.tools.javac.main.Main.compile(Main.java:270)
        at com.sun.tools.javac.Main.compile(Main.java:69)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1097)
        at org.netbeans.nbbuild.CustomJavac.compile(CustomJavac.java:101)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:906)
        at org.netbeans.nbbuild.CustomJavac.execute(CustomJavac.java:81)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor563.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
Comment 1 Quality Engineering 2010-10-17 02:57:09 UTC
Integrated into 'main-golden', will be available in build *201010170000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a4740ba34d03
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #191031: fixing registration of @MimeRegistrations.