Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 84583 Details for
Bug 212100
[dom] Can't create binding to inner class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
test case
bug212100.txt (text/plain), 2.21 KB, created by
Walter Harley
on 2007-12-05 21:23:38 EST
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Walter Harley
Created:
2007-12-05 21:23:38 EST
Size:
2.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.258 >diff -u -r1.258 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 6 Nov 2007 08:39:11 -0000 1.258 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 6 Dec 2007 02:22:06 -0000 >@@ -9512,4 +9512,48 @@ > ITypeBinding iTypeBinding = (ITypeBinding) defaultValue; > assertEquals("Unexpected default value", "b187430.A.B", iTypeBinding.getQualifiedName()); > } >+ >+ /* >+ * Create binding from binding key for inner type >+ */ >+ public void testBug212100() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); >+ String contents = >+ "public class X {\n" + >+ " public class Y {\n" + >+ " void foo() {}\n" + >+ " }\n" + >+ "}"; >+ this.workingCopy.getBuffer().setContents(contents); >+ this.workingCopy.save(null, true); >+ final IBinding[] bindings = new IBinding[4]; >+ final String key = "Ljava/lang/Object;"; // this will make the test fail >+ // final String key = "LX;"; // this would make the test pass >+ >+ resolveASTs( >+ new ICompilationUnit[] { >+ this.workingCopy >+ }, >+ new String[] { >+ key >+ }, >+ new ASTRequestor() { >+ public void acceptBinding(String bindingKey, IBinding binding) { >+ if (key.equals(bindingKey)) { >+ bindings[0] = binding; >+ IBinding[] temp = createBindings(new String[] {"LX;", "LX$Y;", "[LX$Y;"}); >+ for (int i = 0; i < temp.length; ++i) { >+ bindings[i + 1] = temp[i]; >+ } >+ } >+ } >+ }, >+ getJavaProject("Converter15"), >+ null); >+ assertNotNull("Binding for java.lang.Object should not be null", bindings[0]); >+ assertNotNull("Binding for X should not be null", bindings[1]); >+ assertNotNull("Binding for X.Y should not be null", bindings[2]); >+ assertNotNull("Binding for X.Y[] should not be null", bindings[3]); >+ } > } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 212100
:
84583
|
85022
|
88560
|
88801