This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
For demonstrations and other presentations, it is very useful to be able to display (to the audience, to students, etc) the currently used action, in the NetBeans status bar. The NetBeans Key Promoter plugin makes this possible: https://github.com/GeertjanWielenga/NetBeansKeyPromoter The plugin above reads the 'var/uigestures' file, detects actions logged there, and displays them. However, there are two blockers, in these files, which excludes certain actions from being logged, e.g., 'rectangular-block-selection': Module: org.netbeans.modules.editor.lib2 Class: org\netbeans\spi\editor\AbstractEditorAction.java Code: private static boolean isLogged(String actionName) { return actionName != null && !"default-typed".equals(actionName) && //NOI18N -1 == actionName.indexOf("caret") && //NOI18N -1 == actionName.indexOf("delete") && //NOI18N -1 == actionName.indexOf("selection") && //NOI18N -1 == actionName.indexOf("build-tool-tip") &&//NOI18N -1 == actionName.indexOf("build-popup-menu") &&//NOI18N -1 == actionName.indexOf("page-up") &&//NOI18N -1 == actionName.indexOf("page-down") &&//NOI18N -1 == actionName.indexOf("-kit-install"); //NOI18N } Module: org.netbeans.modules.editor.lib Class: org\netbeans\editor\BaseAction.java Code: if (UILOG.isLoggable(Level.FINE)) { String actionName = getValue(NAME) != null ? getValue(NAME).toString().toLowerCase() : null; if (actionName != null && !"default-typed".equals(actionName) && //NOI18N -1 == actionName.indexOf("caret") && //NOI18N -1 == actionName.indexOf("delete") && //NOI18N -1 == actionName.indexOf("undo") &&//NOI18N -1 == actionName.indexOf("redo") &&//NOI18N -1 == actionName.indexOf("selection") && //NOI18N -1 == actionName.indexOf("build-tool-tip") &&//NOI18N -1 == actionName.indexOf("build-popup-menu") &&//NOI18N -1 == actionName.indexOf("page-up") &&//NOI18N -1 == actionName.indexOf("page-down") &&//NOI18N -1 == actionName.indexOf("-kit-install") //NOI18N ) { LogRecord r = new LogRecord(Level.FINE, "UI_ACTION_EDITOR"); // NOI18N r.setResourceBundle(NbBundle.getBundle(BaseAction.class)); if (evt != null) { r.setParameters(new Object[] { evt, evt.toString(), this, toString(), getValue(NAME) }); } else { r.setParameters(new Object[] { "no-ActionEvent", "no-ActionEvent", this, toString(), getValue(NAME) }); //NOI18N } r.setLoggerName(UILOG.getName()); UILOG.log(r); } } What is the reason for the above exclusions and can they be removed or configured? This blocks a very useful feature to promote NetBeans in YouTube clips, conferences, etc.
Certain actions are used internally e.g. for tooltip building and also kit-install actions could be performed at the editor kit installation into editor component so I should retain their exclusion. On the other hand if you think that all the caret movements and selections should be logged I can comment out the exclusions. Not sure about about logging all the typed characters by the "default-typed" action I'll leave it excluded for now. Let's try and we will and we will see if it will be ok or not. http://hg.netbeans.org/jet-main/rev/8bf4d31f56e0
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8bf4d31f56e0 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #262714 - Evaluate why certain Actions are not logged.
Thanks very much, much better. Only multi-caret mode doesn't seem to be captured, can that be included too?
Geertjan, Mila, I think we previously filtered these actions, because otherwise during usual typing activity we had two problems: - huge uigestures file with actions which are not analysed anyway - big I/O activity in parallel to editing file which is a problem at least when userdir at network home (again without real reason)
If you really need it for your plug-in it's worth to introduce some flag (System.getProperty in editor setProperty in your plug-in?). But please, do not slowdown the general IDE editor with I/O
Sure, that property makes perfect sense.
(In reply to Vladimir Voskresensky from comment #5) > If you really need it for your plug-in it's worth to introduce some flag > (System.getProperty in editor setProperty in your plug-in?). But please, do > not slowdown the general IDE editor with I/O Adding a property to intentionally break the ide doesn't sound good. Is it possible for the uigestures-file-writer, to filter what it writes? Or can we introduce a second logging channel for actions not to be included in the uigestures file?
For now I would create a system property that, when turned on, would include the logging of the extra actions added by the last patch. We can add a more elaborate solution later. Can it be like this? org.netbeans.editor.ui.actions.logging.detailed=true
Perfect.
Property added in http://hg.netbeans.org/jet-main/rev/8f112f9b30fb
Integrated into 'main-silver', will be available in build *201609070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8f112f9b30fb User: Miloslav Metelka <mmetelka@netbeans.org> Log: #262714 - Evaluate why certain Actions are not logged - added org.netbeans.editor.ui.actions.logging.detailed system property.