NetBeans infrastructure allows to have Attach-Debug history. The history items appears in the menu associated with Debug button on the main toolbar.
It would be great to have the the history associated with Run button on the main toolbar. It should work exactly the same as for Attach-Debug.
Means BuildExecutionSupportImpl would need to support multiple finished items in a LRU list so that the Run toolbar button could have a dropdown arrow next to it. (TBD if there should be some more keyboard-accessible version of this enhancement as well.) Probably not hard to implement but would require some sort of UI review.
the run history list should be sensitive to currently opened projects only. If project is closed => worth to hide related items from run history list
Created attachment 131389 [details]
api changes in projectuiapi
Created attachment 131390 [details]
implementation in projectui
Created attachment 131391 [details]
implementation for maven projects
Created attachment 131392 [details]
implementation for ant projects
please review the attached api change in projectuiapi module, it's enhancing the BuildExecutionSupport's Item interface to allow grouping per action triggered (see ActionProvider's constants)
the implementation then adds popup to the Run action's toobar icon and records all executed ant and maven project Run builds showing them in the list. Entries get removed when associated project gets closed or when the history list size is exceeded (currently 7 items hardcoded). Entries are not persistent across IDE sessions, but client code can persist it's own executions and call BuildExecutionSupport methods when really required.
thanks for the review
Milos, thanks a lot!
small comment. Please, make BuildExecutionSupportImpl.HISTORY_MAX be configurable as -J-D... instead of hardcoded "7"
Integrated into 'main-golden', will be available in build *201302222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Milos Kleint <email@example.com>
Log: #193873 Run button in toolbar now contains history of previous executions, new api + implementation for ant and maven projects
We have used this API in Oracle Solaris Studio IDE (product, based on CND).
Everything works good, thanks a lot!
Just one question. The JavaDoc says that
is the only supported action for now.
What should be done to support DEBUG actions as well.
Trying to use the functionality in NB launchers (there several history items may be connected to the single project) I faced a problem with inability to unregister an item which is no more valid. Could you please provide a way to somehow update the list?
(In reply to henk89 from comment #13)
> Trying to use the functionality in NB launchers (there several history items
> may be connected to the single project) I faced a problem with inability to
> unregister an item which is no more valid. Could you please provide a way to
> somehow update the list?
what exactly do you mean? how can the build executed become invalid? it's not possible to execute the same build anymore? why not just skip it when someone accidentally triggers it.
(In reply to Milos Kleint from comment #14)
> (In reply to henk89 from comment #13)
> > Trying to use the functionality in NB launchers (there several history items
> > may be connected to the single project) I faced a problem with inability to
> > unregister an item which is no more valid. Could you please provide a way to
> > somehow update the list?
> what exactly do you mean? how can the build executed become invalid? it's
> not possible to execute the same build anymore? why not just skip it when
> someone accidentally triggers it.
We implemented Run launchers for CND projects which allow several run commands for the single project. In case user deletes one of them we should remove the corresponding item from run history.
fine, file a separate low priority issue for it. in the meantime you should make sure that your history item properly recognizes the state and reports to the user when triggered.
closing this one as fixed