Bug 193873 - Need to have history for the Run button
Need to have history for the Run button
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Generic Projects UI
7.0
All All
: P2 (vote)
: 7.4
Assigned To: Milos Kleint
issues@projects
cndreq
: API, API_REVIEW_FAST, UI
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-28 10:55 UTC by igor_nikiforov
Modified: 2013-09-06 09:26 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
api changes in projectuiapi (3.91 KB, application/octet-stream)
2013-02-14 14:45 UTC, Milos Kleint
Details
implementation in projectui (15.79 KB, application/octet-stream)
2013-02-14 14:45 UTC, Milos Kleint
Details
implementation for maven projects (3.60 KB, patch)
2013-02-14 14:45 UTC, Milos Kleint
Details | Diff
implementation for ant projects (5.05 KB, patch)
2013-02-14 14:46 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description igor_nikiforov 2010-12-28 10:55:19 UTC
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.
Comment 1 Jesse Glick 2011-01-07 23:15:02 UTC
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.
Comment 2 Milos Kleint 2013-01-31 14:24:25 UTC
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
Comment 3 Milos Kleint 2013-02-14 14:45:11 UTC
Created attachment 131389 [details]
api changes in projectuiapi
Comment 4 Milos Kleint 2013-02-14 14:45:33 UTC
Created attachment 131390 [details]
implementation in projectui
Comment 5 Milos Kleint 2013-02-14 14:45:55 UTC
Created attachment 131391 [details]
implementation for maven projects
Comment 6 Milos Kleint 2013-02-14 14:46:15 UTC
Created attachment 131392 [details]
implementation for ant projects
Comment 7 Milos Kleint 2013-02-14 14:51:56 UTC
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.
Comment 8 Milos Kleint 2013-02-21 08:45:58 UTC
thanks for the review
Comment 9 Milos Kleint 2013-02-21 12:36:39 UTC
https://hg.netbeans.org/core-main/rev/a2c01c2f07e6
Comment 10 Vladimir Voskresensky 2013-02-21 13:35:32 UTC
Milos, thanks a lot!
small comment. Please, make BuildExecutionSupportImpl.HISTORY_MAX be configurable as -J-D... instead of hardcoded "7"

Thanks again!
Comment 11 Quality Engineering 2013-02-23 04:10:29 UTC
Integrated into 'main-golden', will be available in build *201302222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a2c01c2f07e6
User: Milos Kleint <mkleint@netbeans.org>
Log: #193873 Run button in toolbar now contains history of previous executions, new api + implementation for ant and maven projects
Comment 12 igor_nikiforov 2013-05-23 12:46:57 UTC
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 
  ActionProvider.COMMAND_RUN
is the only supported action for now.
What should be done to support DEBUG actions as well.
Comment 13 henk89 2013-05-24 11:47:11 UTC
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?
Comment 14 Milos Kleint 2013-09-06 07:55:04 UTC
(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.
Comment 15 henk89 2013-09-06 09:19:30 UTC
(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.
Comment 16 Milos Kleint 2013-09-06 09:26:40 UTC
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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo