This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229445

Summary: Hints + Automatic static imports
Product: java Reporter: tomzi <tomzi>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description tomzi 2013-05-07 08:57:06 UTC
For certain static imports it would be helpful to get some support by the IDE.

Eg if I write a test 

...Test {

...
   assertThat(var, is(5));

}

or an EasyMock test


...Test {
   private IMocksControl ctrl = createStrictControl();
...
   expect(ctx.getGlobalVariableNullSafe("VAR")).andStubReturn("");

}

Currently: NB does not know about 'assertThat', 'is', 'createStrinctControl', 'expect'...

Expected: NB should use static imports automatically since I use them all the time in other code.

I have heard Eclipse defines some sort of 'friends' for that, but I think maybe NB should know from the what is being used in other code and from the context that I am writing a test....

Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.8.0-19-generic running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Comment 1 markiewb 2013-07-16 22:00:02 UTC
@Dusan: This issue is obsolete IMHO. See example http://wiki.netbeans.org/File:Staticimportcompletion.png

Static imports are provided on second invocation of CodeCompletion. (new in NB7.4)
Comment 2 markiewb 2013-08-10 12:55:01 UTC
Works for me. See my previous comment https://netbeans.org/bugzilla/show_bug.cgi?id=229445#c1