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 251082 - @TemplateRegistration doesn't allow iconBase to reference icon from another module
Summary: @TemplateRegistration doesn't allow iconBase to reference icon from another m...
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 00:19 UTC by err
Modified: 2015-06-03 15:02 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 err 2015-03-11 00:19:22 UTC
Using the "new ProjectTemplate" wizard I got something like:

@TemplateRegistration(...,
    iconBase = "org/metawb/template/project/quester/Quester.png",
    ...

Here the icon was copied by the wizard.
The app has a module with the icons used by the project, along with spi/api
defs and such. I decided to change the @Temp*Reg* to reference the icon

I tried
        iconBase = Icons.quester,

which is OK in the editor, but when I compile I get

    C:\a\src\wb-dev\wb\QuesterTemplate\src\org\metawb\template\project\quester\QuesterWizardIterator.java:56: error: Cannot find resource org/metawb/ui/resources/blackhole-icon.png
    @TemplateRegistration(folder = "Project/Metaphysical Workbench",
    warning: No processor claimed any of these annotations: org.netbeans.api.templates.TemplateRegistration


So I tried
        iconBase = "nbres:/"+Icons.quester,

and in the editor the error badge had an error

        Cannot find resource: nbres:/org/...png

and going ahead and compiling gave

    An annotation processor threw an uncaught exception.
    Consult the following stack trace for details.
    java.lang.IllegalArgumentException: Invalid relative name: nbres:/org/metawb/ui/resources/blackhole-icon.png
            at com.sun.tools.javac.file.JavacFileManager.getFileForInput(JavacFileManager.java:680)