Re: Problem when patching platform modules that use @Message annotation
Martin Entlicher <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
The Bundle classes are generated from NbBundle.Messages annotations. Try
to do clean and build to force rebuild of the autoupdate module. That
should process the annotations by NbBundleProcessor. If problems
persists, assure that you have openide.util module checked out, which
contains the processor and that you have proper dependency set on that
module.
Hope that helps.
Martin
On 18.5.2016 18:50, jhuber wrote:
> Hello!
>
> I'm trying to patch a platform module for the first time. It seems to work fine, except when I have classes that use the @Message annotation. I have set up for patching modules per the following FAQ:
> http://wiki.netbeans.org/DevFaqOrphanedNetBeansOrgModules
>
> Many of the classes use a construct like
>
> Code:
> import static org.netbeans.modules.autoupdate.ui.Bundle.*;
>
>
>
> The are no red flags in the IDE, but there is a compiler error when compiling or building:
>
> Code:
> error: cannot find symbol
> import static org.netbeans.modules.autoupdate.ui.Bundle.*;
> symbol: class Bundle
> location: package org.netbeans.modules.autoupdate.ui
>
>
>
> A typical usage would be
>
> Code:
> @Messages("CTL_OsgiBundleFilterDescription=OSGi Bundle files (*.jar)")
> public String getDescription() {
> return CTL_OsgiBundleFilterDescription(); // NOI18N
> }
>
>
>
> If I comment out the import line, and use Bundle. CTL_OsgiBundleFilterDescription();, there are no red flags in the IDE, but compile still fails with
>
> Code:
> error: cannot find symbol
> return Bundle.CTL_OsgiBundleFilterDescription(); // NOI18N
> symbol: variable Bundle
> location: class OsgiBundleFilter
>
>
>
> I'm using JDK 7 for the module patching (as required by 8.0.2); I switched back to JDK 6, but the problem still occurs. It seems that the compiler cannot find the items created from the annotations.
>
> Any ideas? I suspect something is wrong in my patching setup, but not sure what.
>
> Thanks!
>
>
>
>