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 174782 - [68cat] Fix imports does not resolve static imports
Summary: [68cat] Fix imports does not resolve static imports
Status: RESOLVED DUPLICATE of bug 89258
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-16 21:50 UTC by giorgio42
Modified: 2009-10-19 11:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description giorgio42 2009-10-16 21:50:17 UTC
[ JDK VERSION : 1.6.* ]


I have a J2SE project with Test Packages. junit-4.5.jar is on the
test class path (through appropriately setting the project
properties).

If I write

@Test
public void myTest()
{
  int expectedNumberOfFoos = 4;
  int numberOfFoos = returnSomething();
  assertEquals( "Wrong number of Foos", expectedNumberOfFoos,
numberOfFoos );
}

and then press Ctrl+Shift+I NetBeans is not able to resolve the
assertEquals() method and does nothing instead of adding

import static org.junit.Assert.assertEquals;

Moreover, when I manually add the import statement and the cursor is
at the pipe character in the snippet here,

import static org.junit.Assert.|

NB shows all overloads of all static methods in Assert as if I would
be writing code in a method body. NB should only show the names of
the static methods, no overloads and no parameters.
Comment 1 giorgio42 2009-10-16 21:52:03 UTC
I could confirm this behavior with M2 and a version compiled from todays main-golden repository.

Comment 2 Jiri Prox 2009-10-19 11:19:53 UTC

*** This issue has been marked as a duplicate of 89258 ***