Comment créer un bouton personnalisé dans la barre d'outils Netbeans?
-
27-10-2019 - |
Question
J'ai un script de ligne de commande I enregistrée dans un fichier sur mon PC. Comment puis-je créer un bouton de barre d'outils NB 7.0 afin que cliquant sur ce bouton exécuter mon script sauvé? En outre, quelle extension de fichier dois-je nommer mon fichier script pour qu'il sera exécutable, ou faut-il rien du tout?
La solution
Here is a Toolbar button tutorial. And your script can be anything that can be executed in or by Java, the NetBeans Platform does not constrain you in that manner
Autres conseils
In addition to Tim's answer, you can create a simple shortcut to an Ant target, as outlined in the Netbeans Wiki:
- Open the Files window and find your build.xml
- Expand the build.xml to find your target
- Right-click your target and click "Create Shortcut..."
- Follow the wizard to create your button.
This can be used to create a menu item, toolbar button, keyboard shortcut or a custom Ant "mini-script."