Bug 478840 - Quick-fix option for static field import
Summary: Quick-fix option for static field import
Status: CLOSED DUPLICATE of bug 197850
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-01 13:28 EDT by Stefan Falk CLA
Modified: 2015-10-05 04:46 EDT (History)
2 users (show)

See Also:


Attachments
Currently there's no useful option for static fields. (16.86 KB, image/png)
2015-10-01 13:35 EDT, Stefan Falk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Falk CLA 2015-10-01 13:28:58 EDT
Eclipse does not support auto-import for static fields via the CTRL + SHIFT + O shortcut. But would it be possible to add a quick-fix that would convert for example:

  switch(day) {
  case Calendar.APRIL:
    // ..

into:

  import static java.util.Calendar.APRIL;

  // ..

  switch(day) {
  case APRIL:
    // ..

That quick-fix option could show up whenever the cursor marks the static field (here APRIL).
Comment 1 Stefan Falk CLA 2015-10-01 13:35:15 EDT
Created attachment 256977 [details]
Currently there's no useful option for static fields.
Comment 2 Matthew Davis CLA 2015-10-01 13:45:10 EDT
Stefan, you've posted this to the STEM project.  I'm changing the product to JDT, as that seems most relevant to your request.
-Matt
Comment 3 Noopur Gupta CLA 2015-10-05 04:46:30 EDT

*** This bug has been marked as a duplicate of bug 197850 ***