Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 106034 - Need organize imports for StaticClass. situations...
Summary: Need organize imports for StaticClass. situations...
Status: RESOLVED DUPLICATE of bug 44627
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 08:46 EDT by Martin Olsson CLA
Modified: 2005-08-15 13:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Olsson CLA 2005-08-04 08:46:24 EDT
I'm coding an Eclipse plugin right now and while doing this I tend to use the 
following method quite alot:

  MessageDialog.openInformation()

One very annoying thing that I've noticed is the following. Suppose 
MessageDialog has not previously been used in the current source file. Now I 
type:

  MessageDialog.

And wait for the content assist features, however it never appears. Thus I 
press the CTRL-SHIFT-O keys to force Eclipse to understand, but still nothing. 
Instead it's whining about my syntax error. Thus I cant finish the line because 
I need content assist, and Eclipse wont give me content assist until I finish 
the line. Thus, I'm stuck in an annoying catch 22 situation. I typically sort 
to typing this instead:

  MessageDialog a;

And then press CTRL-SHIFT-O, get the import line. and the erase the " a;" part 
and type in my "." again. This is very very annoying and lot's of unecessary 
work. Why can't you please make Eclipse understand that SOMETHING. might be a 
someone about to call a static method (and thus organize imports should work in 
this situation). Please I can't live with an omnipresent CTRL-SHIFT-O feature, 
it's sooo nice. Thanks for your time.
Comment 1 Frederic Fusier CLA 2005-08-04 08:53:37 EDT
Have you try first to complete before the final '.'?
I mean, type "MessageDia" and then complete, does it work (ie. complete to
"MessageDialog")?
If so, then append the dot and complete again... Perhaps completion works better
now, doesn't it?
If this does not help, please provide a sample of source in which completion
does not work, thanks
Comment 2 Martin Olsson CLA 2005-08-12 07:24:40 EDT
Your method works, but IMHO typing "MessageDialog." and then pressing CTRL-
SHIFT-O is more natural and Eclipse should support both ways.
Comment 3 Frederic Fusier CLA 2005-08-15 11:13:05 EDT
Move to JDT/UI for comments on Ctrl-Shift-O behavior enhancement...
Comment 4 Dirk Baeumer CLA 2005-08-15 13:26:32 EDT

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