NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Netbeans Maven Lexer Fontscolors

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Klaus Martinschitz



Joined: 23 Jan 2010
Posts: 120

PostPosted: Sun Feb 19, 2017 4:28 pm    Post subject: Netbeans Maven Lexer Fontscolors Reply with quote

Hello,

i am currently migrating from plane Netbeans modules to Netbeans Maven modules. First, I want to migrate a lexer module that perfectly worked previously. However, when I run the Maven compiled app, I don't see the defined lexer language in the Options dialog of my app (Tools->Options->Fonts & colors). From my previous experience I know that there must be everything absolutely correct or I don't see anything. Within my Maven module, there is a layer.xml file (correctly defined in the manifest file) that contains the reference to my FontAndColors.xml file. However, when I build with maven, the content of the layr.xml seems not to be merged with the generated layer.xml content. I have two questions.
(i) Is there already an annotation available to define the FontAndColors.xml position and any documentation for it?
(ii) if not, how can I tell Maven to merge the content of my layer.xml with its generated content?
Thanks a lot.

Regards,
Klaus
Back to top
Klaus Martinschitz



Joined: 23 Jan 2010
Posts: 120

PostPosted: Wed Feb 22, 2017 7:49 am    Post subject: Solved Reply with quote

Hello,

I have tried a lot and found out finally, that Netbeans Maven seems to merge the layer.xml somehow but not to the generated-layer.xml file. The files generated-layer.xml and layer.xml seem to stay separated but are merged internally during runtime. So, there seems to be no problem anymore. Just define everything you want in the layer.xml file.

Regards,
Klaus
Back to top
jmborer



Joined: 01 Mar 2013
Posts: 220

PostPosted: Mon Feb 27, 2017 8:48 am    Post subject: Netbeans Maven Lexer Fontscolors Reply with quote

Hi Klaus,

A few years ago, I asked a question about the generated-layer.xml content and how it is handled. 


So the location of generated-layer.xml is hard coded in NB and the module manager tries to load it for every module if found. Hence there is no point to declare it in the module descriptor. 


You can define your own layer.xml (don't forget to declare that one!) which will live in parallel of the generated one. They will be merged at runtime. The only thing I don't remember is the priority of the merge. There are many chances that your layer.xml has priority over the generated file. 


Cheers,


JMB


On Wed, Feb 22, 2017 at 7:49 AM, Klaus Martinschitz <address-removed ([email]address-removed[/email])> wrote:
Quote:
Hello,

I have tried a lot and found out finally, that Netbeans Maven seems to merge the layer.xml somehow but not to the generated-layer.xml file. The files  generated-layer.xml and layer.xml seem to stay separated but are merged internally during runtime. So, there seems to be no problem anymore. Just define everything you want in the layer.xml file.

Regards,
Klaus




Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo