You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Peter Cheung <pe...@quantr.hk> on 2023/03/24 14:06:25 UTC

reuse existing icon

Hi
   I try to extends  the text/x-java and add a new multiview. How to reuse existing icon?

@MultiViewElement.Registration(
            displayName = "#LBL_Java_Disasm",
//          iconBase = "hk/quantr/jcd/javaLogo16_16.png",   <--- what should i fill in here?
            mimeType = "text/x-java",
            persistenceType = TopComponent.PERSISTENCE_NEVER,
            preferredID = "JavaVisual",
            position = 22000
)


Thanks

From Peter (System Architect, Quantr Limited https://www.quantr.hk<https://www.quantr.hk/> , Mobile : 96554595)

Re: reuse existing icon

Posted by Peter Cheung <pe...@quantr.hk>.
thanks Eirik
________________________________
From: Eirik Bakke <eb...@ultorg.com>
Sent: Friday, March 31, 2023 6:03 AM
To: dev@netbeans.apache.org <de...@netbeans.apache.org>
Subject: RE: reuse existing icon

I think you'd need to copy the icon file from the NetBeans codebase and into your own module's resources folder, then reference it from iconBase. (Or perhaps you can reference the icon in the NetBeans module directly if your module has a direct dependency on the NetBeans module; I'm not sure how the classloader stuff works here.)

-- Eirik

-----Original Message-----
From: Peter Cheung <pe...@quantr.hk>
Sent: Friday, March 24, 2023 10:06 AM
To: dev@netbeans.apache.org
Subject: reuse existing icon

Hi
   I try to extends  the text/x-java and add a new multiview. How to reuse existing icon?

@MultiViewElement.Registration(
            displayName = "#LBL_Java_Disasm",
//          iconBase = "hk/quantr/jcd/javaLogo16_16.png",   <--- what should i fill in here?
            mimeType = "text/x-java",
            persistenceType = TopComponent.PERSISTENCE_NEVER,
            preferredID = "JavaVisual",
            position = 22000
)


Thanks

From Peter (System Architect, Quantr Limited https://www.quantr.hk<https://www.quantr.hk/> , Mobile : 96554595)

RE: reuse existing icon

Posted by Eirik Bakke <eb...@ultorg.com>.
I think you'd need to copy the icon file from the NetBeans codebase and into your own module's resources folder, then reference it from iconBase. (Or perhaps you can reference the icon in the NetBeans module directly if your module has a direct dependency on the NetBeans module; I'm not sure how the classloader stuff works here.)

-- Eirik

-----Original Message-----
From: Peter Cheung <pe...@quantr.hk> 
Sent: Friday, March 24, 2023 10:06 AM
To: dev@netbeans.apache.org
Subject: reuse existing icon

Hi
   I try to extends  the text/x-java and add a new multiview. How to reuse existing icon?

@MultiViewElement.Registration(
            displayName = "#LBL_Java_Disasm",
//          iconBase = "hk/quantr/jcd/javaLogo16_16.png",   <--- what should i fill in here?
            mimeType = "text/x-java",
            persistenceType = TopComponent.PERSISTENCE_NEVER,
            preferredID = "JavaVisual",
            position = 22000
)


Thanks

From Peter (System Architect, Quantr Limited https://www.quantr.hk<https://www.quantr.hk/> , Mobile : 96554595)