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 155567 - Shortcut for fix import is missing
Summary: Shortcut for fix import is missing
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Janicek
URL:
Keywords:
: 154543 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-16 15:42 UTC by Lukas Jungmann
Modified: 2012-05-31 12:03 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-12-16 15:42:11 UTC
-have a source with missing import statement(s)
-press Ctrl+Shift+I to fix imports

=>
 expected: missing imports are added/"Nothing to fix in import statements." msg appears in status bar/UI with available
classes to import appears
 actual: nothing happens
Comment 1 Petr Hejl 2009-10-15 20:48:45 UTC
Hint for import fixing in web-main dc3130d56586.

Fix import is java specific action. So there would have to be an API/SPI to plug in language specific "fix imports" =>
changing to enhancement.
Comment 2 Quality Engineering 2009-10-16 22:03:00 UTC
Integrated into 'main-golden', will be available in build *200910161401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dc3130d56586
User: phejl@netbeans.org
Log: #155567 Shortcut for fix import is missing
Comment 3 Martin Janicek 2011-12-13 10:01:48 UTC
*** Bug 154543 has been marked as a duplicate of this bug. ***
Comment 4 Martin Janicek 2012-03-12 09:38:39 UTC
Fixed in: web-main #66eb3b99af6a
Comment 5 Quality Engineering 2012-03-13 14:10:52 UTC
Integrated into 'main-golden', will be available in build *201203130400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/66eb3b99af6a
User: Martin Janicek <mjanicek@netbeans.org>
Log: #155567 - Shortcut for fix import is missing
Comment 6 cellux 2012-05-31 11:41:00 UTC
Functionality seems to have issues. 

Example source:

class MyGroovyTest {
	@Test
        void succeed() {
            Assert.assertEquals(4, 2+2);
        }
}




Altough I have junit-4.8.1.jar in my test classpath (specified in maven pom, shows up correctly under "Test Dependencies"), import options I get are only:

org.apache.cataline.deploy.Test
junit.framework.Test


Also for Assert I don't get any hint for missing import - this is like this for all static method calls. Tested build 20120530
Comment 7 Martin Janicek 2012-05-31 11:52:51 UTC
Thanks for reporting this, those are definitely valid bugs. I'm going to fill an issue to track this.
Comment 8 Martin Janicek 2012-05-31 12:03:02 UTC
I've created issue 213297. Closing this one, as the problem is more or less a bug (functionality is working only with some troubles :]) and there is no need to have opened two tickets for the same problem. I'll take a look at it soon..