In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to customize project properties in Firefox Extension in NetBeans. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
The Firefox Extension custom project properties process in NetBeans is shown below.
For example,{appname} here is the name of the application, and {appid} I don't need to say more, it is the id of the application. These properties can be configured in the project properties, but many times, we need to customize a string like this, for example, I want to set the application image and call {appimage}, NetBeans is not recognized, but I want him to recognize and apply in the application, how to do it.
In fact, it is very simple, we need to understand how NetBeans compiles our XPI file at the beginning. When NetBeans compiles the XPI file, it only makes some substitutions and compresses it into XPI, and generates a Firefox extension. Therefore,{appid} is only replaced with the corresponding application id when compiling, and then packaged. Now that we know this, we can add and delete it very well.
In NetBeans, we find the files tab on the top left panel, find the files for the project, we can see that there is the nbproject folder, our settings are in it. Open project-moz.properties file, we will see our properties, such as appid, appname, etc., where we can manually assign, separated by carriage returns, that is, a line of settings. The method to create it is keyword=value, remember that value does not need quotation marks, whether it is a character, a number, or a string.
After creating the attribute,{keyword} cannot be used yet. We must also modify the place of substitution compiled. This place is in build-moz-impl.xml in the same folder. We can search for placetokens and see that there are some XML elements in it as substitution during compilation. OK, now we just need to add our custom attribute, the format is as follows.
As long as we write this string in placetokens, we can use the {keyword} method to replace keys in the project. This makes it easier to read and maintain.
About "Firefox Extension in NetBeans how to customize project properties" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.