Bug 24511 - AST: Resolve on non-visible import
Summary: AST: Resolve on non-visible import
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-08 11:08 EDT by Martin Aeschlimann CLA
Modified: 2002-10-17 10:31 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 Aeschlimann CLA 2002-10-08 11:08:53 EDT
20021001
package pack1;
class W {
}

package pack2;
import pack1.W;
class D {
}

In D, 'pack1.W' is marked as non-visible. When I get the binding of the 
qulified name it is null. Could it be changed to return the type?

TestCase for this is
LocalCorrectionsQuickFixTest.testInvisibleImport
Comment 1 Olivier Thomann CLA 2002-10-08 11:28:24 EDT
I will investigate.
Comment 2 Olivier Thomann CLA 2002-10-08 12:35:01 EDT
Fixed and released in 2.1 stream. Regression test added.
I still have an error with your test.
junit.framework.AssertionFailedError: Wrong number of proposals, is: 0, expected: 1
	at junit.framework.Assert.fail(Assert.java:51)
	at junit.framework.Assert.assertTrue(Assert.java:38)
	at
org.eclipse.jdt.ui.tests.quickfix.QuickFixTest.assertNumberOf(QuickFixTest.java:54)
	at
org.eclipse.jdt.ui.tests.quickfix.LocalCorrectionsQuickFixTest.testInvisibleImport(LocalCorrectionsQuickFixTest.java:1057)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at junit.framework.TestCase.runTest(TestCase.java:166)
	at junit.framework.TestCase.runBare(TestCase.java:140)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:131)
	at junit.framework.TestSuite.runTest(TestSuite.java:173)
	at junit.framework.TestSuite.run(TestSuite.java:168)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:358)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:244)
	at
org.eclipse.pde.internal.junit.ui.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30)
	at
org.eclipse.pde.internal.junit.ui.UITestApplication.runEventLoop(UITestApplication.java:34)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1255)
	at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)

Comment 3 Olivier Thomann CLA 2002-10-08 12:55:16 EDT
Fixed and released in 2.1 stream. Regression test added.
Comment 4 David Audel CLA 2002-10-17 10:31:04 EDT
Verified.