Bug 562639 - Add import static org.mockito.Mockito.*; to favorites in JDT
Summary: Add import static org.mockito.Mockito.*; to favorites in JDT
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.19 M2   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks: 569282
  Show dependency tree
 
Reported: 2020-04-30 02:34 EDT by Lars Vogel CLA
Modified: 2021-08-04 13:00 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-04-30 02:34:36 EDT
Mockito is a very popular test framework and IDE like IntelliJ provide quickfixes and code completion out of the box for them. Can we add org.mockito.Mockito.*; to our default favorites in JDT? This would give a similar experience in Eclipse as in IntelliJ. And AFAIK adding this does not create issues for the user, even if he does not use Mockito.
Comment 1 Lars Vogel CLA 2020-04-30 02:34:59 EDT
Noopur, WDYT?
Comment 2 Noopur Gupta CLA 2020-05-04 04:33:43 EDT
It will be OK to add a new favorite if there's a demand but I haven't seen any other bug request to add Mockito yet.

Also, it should be checked which classes/packages from Mockito are desired most frequently and only those should be added to favorites.
Comment 3 Lars Vogel CLA 2021-01-28 04:51:21 EST
(In reply to Noopur Gupta from comment #2)
> It will be OK to add a new favorite if there's a demand but I haven't seen
> any other bug request to add Mockito yet.
> 
> Also, it should be checked which classes/packages from Mockito are desired
> most frequently and only those should be added to favorites.

org.mockito.Mockito.* seems to be the big win. I'm delivering a JUnit / Mockito, etc. training to a customer and that one would make already a big difference.
Comment 4 Eclipse Genie CLA 2021-01-28 04:54:38 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/175431
Comment 6 Noopur Gupta CLA 2021-01-28 07:31:31 EST
Thanks for the patch, Lars. Please verify it in the next build and add an N&N entry.
Comment 7 Eclipse Genie CLA 2021-01-28 08:22:17 EST
New Gerrit change created: https://git.eclipse.org/r/c/www.eclipse.org/eclipse/news/+/175441
Comment 9 Pierre-Yves Bigourdan CLA 2021-01-28 14:05:24 EST
Thanks for adding this, it will be handy for me as well!
Comment 10 Lars Vogel CLA 2021-01-28 15:23:55 EST
(In reply to Pierre-Yves B. from comment #9)
> Thanks for adding this, it will be handy for me as well!

If you think we should add more Mockito packages, please let us know.
Comment 11 Lars Vogel CLA 2021-08-04 12:59:49 EDT
After writing lots of Mockito tests for a client I noted that org.mockito.ArgumentMatchers.*; is used very frequently. Opened Bug 575246 to add this also.