s4gh commented on PR #7925: URL: https://github.com/apache/netbeans/pull/7925#issuecomment-2568108137
@neilcsmith-net this was my first attempt to create PR for Netbeans. So please sorry very basic questions. Yes, i meant extracting implementation of both "collapse" and "navigate to selected" as an "actions" which are properly annotated. To be honest at this point I do not quite understand what is ActionReference. The only doc I"ve found is this one https://netbeans.apache.org/wiki/main/netbeansdevelopperfaq/DevFaqHowOrganizeOrReuseExistingActionsWithAnnotations/ but unfortunately for me this page is not very detailed and does not really explain what is ActionReference and what values should be for "path" and "position". As for icons - I've found two different examples here https://netbeans.apache.org/wiki/main/netbeansdevelopperfaq/DevFaqAddIconToContextMenu/ and here https://netbeans.apache.org/wiki/main/netbeansdevelopperfaq/DevFaqToggleActionAddToEditorToolbar/ One of these examples is for toolbar icon and the other one is for context menu. But I am not putting icons into context menu or default toolbar. I am putting them into view directly ``` ImageIcon collapseTreeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/collapseTree.svg",false); JButton collapseAllButton = new JButton(); collapseAllButton.setIcon(collapseTreeIcon); ... buttonPanel.add(collapseAllButton); ``` Do I need to define icon using annotation in this case? Is there any example you can point me to so that I could check how to define icon in action itself for such case which is neither toolbar nor context menu? As for action execution I assume you've meant using this approach https://netbeans.apache.org/wiki/main/netbeansdevelopperfaq/DevFaqInvokeActionProgrammatically/ right? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
